Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract json support to its own files
Extract json support into its own files so we don't get yet more functionality in the main qstat files. Also: * Created basic armyops files to facilitate the above.
- Loading branch information
Showing
8 changed files
with
1,302 additions
and
1,284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* qstat | ||
* | ||
* Armyops Protocol | ||
* Copyright 2005 Omnix | ||
* | ||
* Licensed under the Artistic License, see LICENSE.txt for license terms | ||
* | ||
*/ | ||
|
||
#include "qstat.h" | ||
|
||
void | ||
json_display_armyops_player_info(struct qserver *server) | ||
{ | ||
struct player *player; | ||
|
||
player = server->players; | ||
for (; player != NULL; player = player->next) { | ||
player->score = calculate_armyops_score(player); | ||
} | ||
|
||
json_display_player_info(server); | ||
} | ||
|
||
// vim: sw=4 ts=4 noet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* qstat | ||
* | ||
* Armyops Protocol | ||
* Copyright 2005 Omnix | ||
* | ||
* Licensed under the Artistic License, see LICENSE.txt for license terms | ||
*/ | ||
#ifndef QSTAT_ARMOPS_H | ||
#define QSTAT_ARMOPS_H | ||
|
||
int calculate_armyops_score(struct player *player); | ||
void json_display_armyops_player_info(struct qserver *server); | ||
|
||
#endif |
Oops, something went wrong.