diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-04-14 14:11:28 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-04-14 14:11:28 +0200 |
commit | 65bcda9407a65e1daeecb40f118bc57abe80fb54 (patch) | |
tree | 87666cbcfc8829a00874c3d1317b60af04c476c4 /FICS/talkproc.c | |
parent | b13fbf870d0e64b5fadf58eaff726dacd0f613dd (diff) |
Reformatted com_cshout()
Diffstat (limited to 'FICS/talkproc.c')
-rw-r--r-- | FICS/talkproc.c | 74 |
1 files changed, 41 insertions, 33 deletions
diff --git a/FICS/talkproc.c b/FICS/talkproc.c index 97426cb..1de4503 100644 --- a/FICS/talkproc.c +++ b/FICS/talkproc.c @@ -133,41 +133,49 @@ PUBLIC int com_shout(int p, param_list param) return COM_OK; } -PUBLIC int com_cshout(int p, param_list param) +PUBLIC int +com_cshout(int p, param_list param) { - int p1; - int count = 0; + int count = 0; + int p1; - if (!parray[p].registered) { - pprintf(p, "Only registered players can use the cshout command.\n"); - return COM_OK; - } - if (in_list(p, L_CMUZZLE, parray[p].login)) { - pprintf(p, "You are c-muzzled.\n"); - return COM_OK; - } - if (!printablestring(param[0].val.string)) { - pprintf(p, "Your message contains some unprintable character(s).\n"); - return COM_OK; - } -/* in_push(IN_SHOUT); */ - for (p1 = 0; p1 < p_num; p1++) { - if (p1 == p) - continue; - if (parray[p1].status != PLAYER_PROMPT) - continue; - if (!parray[p1].i_cshout) - continue; - if (player_censored(p1, p)) - continue; - count++; - pprintf_prompt(p1, "\n%s c-shouts: %s\n", parray[p].name, - param[0].val.string); - } - pprintf(p, "(%d) %s c-shouts: %s\n", count, parray[p].name, - param[0].val.string); -/* in_pop(); */ - return COM_OK; + if (!parray[p].registered) { + pprintf(p, "Only registered players can use the cshout " + "command.\n"); + return COM_OK; + } + + if (in_list(p, L_CMUZZLE, parray[p].login)) { + pprintf(p, "You are c-muzzled.\n"); + return COM_OK; + } + + if (!printablestring(param[0].val.string)) { + pprintf(p, "Your message contains some unprintable " + "character(s).\n"); + return COM_OK; + } + + for (p1 = 0; p1 < p_num; p1++) { + if (p1 == p) + continue; + if (parray[p1].status != PLAYER_PROMPT) + continue; + if (!parray[p1].i_cshout) + continue; + if (player_censored(p1, p)) + continue; + + count++; + + pprintf_prompt(p1, "\n%s c-shouts: %s\n", + parray[p].name, + param[0].val.string); + } + + pprintf(p, "(%d) %s c-shouts: %s\n", count, parray[p].name, + param[0].val.string); + return COM_OK; } PUBLIC int |