From eb4c2e224c13cfd4d7af1f4633e5c4cbe895ef5b Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Wed, 3 Jan 2024 02:22:57 +0100 Subject: Reformatted FindPlayer() --- FICS/comproc.c | 29 ++++++++++++++++------------- 1 file 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) -- cgit v1.2.3