aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/playerdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r--FICS/playerdb.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index a1d3e9a..4e69e57 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -1180,20 +1180,25 @@ PUBLIC int showstored(int p)
}
-PUBLIC int player_count(int CountAdmins)
+PUBLIC int
+player_count(int CountAdmins)
{
- int count;
- int i;
+ int count;
+ int i;
- for (count = 0, i = 0; i < p_num; i++) {
- if ((parray[i].status == PLAYER_PROMPT) &&
- (CountAdmins || !in_list(i, L_ADMIN, parray[i].name)))
- count++;
- }
- if (count > player_high)
- player_high = count;
+ count = 0;
+ i = 0;
- return count;
+ while (i < p_num) {
+ if (parray[i].status == PLAYER_PROMPT &&
+ (CountAdmins || !in_list(i, L_ADMIN, parray[i].name)))
+ count++;
+ i++;
+ }
+
+ if (count > player_high)
+ player_high = count;
+ return count;
}
PUBLIC int