aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-05-09 20:39:57 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-05-09 20:39:57 +0200
commit666df0c1b0b8c978e86d69042efd6c70ddc703af (patch)
treea135268b15df1fa879603bb655b5bcca1ca991af /FICS
parent1489e8e6fd0ffdb799038c0cd93471c17690cbfb (diff)
Reformatted com_asetblitz()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/adminproc.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/FICS/adminproc.c b/FICS/adminproc.c
index 136758e..1b8eb13 100644
--- a/FICS/adminproc.c
+++ b/FICS/adminproc.c
@@ -1509,22 +1509,25 @@ PRIVATE void SetRating(int p1, param_list param, statistics *s)
* The parameters are self-explanatory: rating, # of wins, # of losses,
* # of draws, and ratings deviation.
*/
-PUBLIC int com_asetblitz(int p, param_list param)
+PUBLIC int
+com_asetblitz(int p, param_list param)
{
- int p1, connected;
+ int p1, connected;
- ASSERT(parray[p].adminLevel >= ADMIN_ADMIN);
- if (!FindPlayer(p, param[0].val.word, &p1, &connected))
- return COM_OK;
+ ASSERT(parray[p].adminLevel >= ADMIN_ADMIN);
- SetRating(p1, param, &parray[p1].b_stats);
- player_save(p1);
- UpdateRank(TYPE_BLITZ, parray[p1].name, &parray[p1].b_stats,
- parray[p1].name);
- pprintf(p, "Blitz rating for %s modified.\n", parray[p1].name);
- if (!connected)
- player_remove(p1);
- return COM_OK;
+ if (!FindPlayer(p, param[0].val.word, &p1, &connected))
+ return COM_OK;
+
+ SetRating(p1, param, &parray[p1].b_stats);
+ player_save(p1);
+ UpdateRank(TYPE_BLITZ, parray[p1].name, &parray[p1].b_stats,
+ parray[p1].name);
+ pprintf(p, "Blitz rating for %s modified.\n", parray[p1].name);
+
+ if (!connected)
+ player_remove(p1);
+ return COM_OK;
}
/*