diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-01-03 02:22:57 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-01-03 02:22:57 +0100 |
commit | eb4c2e224c13cfd4d7af1f4633e5c4cbe895ef5b (patch) | |
tree | f641baf8d7b30e08d5eb33470e99c57bd8df88bb /FICS | |
parent | 705fe4297293682c6b34c75ac53999cfc479ea62 (diff) |
Reformatted FindPlayer()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/comproc.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c index 3757ff3..91cfa99 100644 --- a/FICS/comproc.c +++ b/FICS/comproc.c @@ -264,20 +264,23 @@ PUBLIC int com_set(int p, param_list param) return COM_OK; } -PUBLIC int FindPlayer(int p, char* name, int *p1, int *connected) +PUBLIC int +FindPlayer(int p, char *name, int *p1, int *connected) { - *p1 = player_search(p, name); - if (*p1 == 0) - return 0; - if (*p1 < 0) { /* player had to be connected and will be - removed later */ - *connected = 0; - *p1 = (-*p1) - 1; - } else { - *connected = 1; - *p1 = *p1 - 1; - } - return 1; + *p1 = player_search(p, name); + + if (*p1 == 0) + return 0; + if (*p1 < 0) { // The player had to be connected and will be removed + // later. + *connected = 0; + *p1 = (-*p1) - 1; + } else { + *connected = 1; + *p1 = *p1 - 1; + } + + return 1; } PRIVATE void com_stats_andify(int *numbers, int howmany, char *dest) |