diff options
-rw-r--r-- | FICS/adminproc.c | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/FICS/adminproc.c b/FICS/adminproc.c index 2c501c7..98f998f 100644 --- a/FICS/adminproc.c +++ b/FICS/adminproc.c @@ -1563,22 +1563,25 @@ PUBLIC int com_asetwild(int p, param_list param) * The parameters are self-explanatory: rating, # of wins, # of losses, # of * draws, and ratings deviation. */ -PUBLIC int com_asetstd(int p, param_list param) +PUBLIC int +com_asetstd(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].s_stats); - player_save(p1); - UpdateRank(TYPE_STAND, parray[p1].name, &parray[p1].s_stats, - parray[p1].name); - pprintf(p, "Standard 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].s_stats); + player_save(p1); + UpdateRank(TYPE_STAND, parray[p1].name, &parray[p1].s_stats, + parray[p1].name); + pprintf(p, "Standard rating for %s modified.\n", parray[p1].name); + + if (!connected) + player_remove(p1); + return COM_OK; } /* @@ -1590,20 +1593,23 @@ PUBLIC int com_asetstd(int p, param_list param) * The parameters are self-explanatory: rating, # of wins, # of losses, # of * draws, and ratings deviation. */ -PUBLIC int com_asetlight(int p, param_list param) +PUBLIC int +com_asetlight(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].l_stats); - player_save(p1); - pprintf(p, "Lightning 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].l_stats); + player_save(p1); + pprintf(p, "Lightning rating for %s modified.\n", parray[p1].name); + + if (!connected) + player_remove(p1); + return COM_OK; } /* |