diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-05-09 20:35:03 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-05-09 20:35:03 +0200 |
commit | efc730272de5c706b61057917eff0a56a8cb02e9 (patch) | |
tree | 3b7dcf111289988de05c7694a15d0748eea751f6 /FICS/adminproc.c | |
parent | a406fd7726b0acfe05b2ca02473463aaa787e0ef (diff) |
Reformatted com_nuke()
Diffstat (limited to 'FICS/adminproc.c')
-rw-r--r-- | FICS/adminproc.c | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/FICS/adminproc.c b/FICS/adminproc.c index 8cbd95b..2c501c7 100644 --- a/FICS/adminproc.c +++ b/FICS/adminproc.c @@ -1616,28 +1616,34 @@ PUBLIC int com_asetlight(int p, param_list param) * automatically placed in the user's files (if she/he is a registered * user, of course). */ -PUBLIC int com_nuke(int p, param_list param) +PUBLIC int +com_nuke(int p, param_list param) { - int p1, fd; + int p1, fd; - ASSERT(parray[p].adminLevel >= ADMIN_ADMIN); - if ((p1 = player_find_part_login(param[0].val.word)) < 0) { - pprintf(p, "%s isn't logged in.\n", param[0].val.word); - } else { - if ((parray[p].adminLevel > parray[p1].adminLevel) || player_ishead(p)) { - pprintf(p, "Nuking: %s\n", param[0].val.word); - pprintf(p, "Please leave a comment explaining why %s was nuked.\n", parray[p1].name); - pprintf(p1, "\n\n**** You have been kicked out by %s! ****\n\n", parray[p].name); - pcommand(p, "addcomment %s Nuked\n", parray[p1].name); - fd = parray[p1].socket; - process_disconnection(fd); - net_close_connection(fd); - return COM_OK; - } else { - pprintf(p, "You need a higher adminlevel to nuke %s!\n", param[0].val.word); - } - } - return COM_OK; + ASSERT(parray[p].adminLevel >= ADMIN_ADMIN); + + if ((p1 = player_find_part_login(param[0].val.word)) < 0) { + pprintf(p, "%s isn't logged in.\n", param[0].val.word); + } else { + if ((parray[p].adminLevel > parray[p1].adminLevel) || + player_ishead(p)) { + pprintf(p, "Nuking: %s\n", param[0].val.word); + pprintf(p, "Please leave a comment explaining why %s " + "was nuked.\n", parray[p1].name); + pprintf(p1, "\n\n**** You have been kicked out by %s! " + "****\n\n", parray[p].name); + pcommand(p, "addcomment %s Nuked\n", parray[p1].name); + fd = parray[p1].socket; + process_disconnection(fd); + net_close_connection(fd); + return COM_OK; + } else { + pprintf(p, "You need a higher adminlevel to nuke %s!\n", + param[0].val.word); + } + } + return COM_OK; } /* |