aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-05-18 11:50:36 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-05-18 11:50:36 +0200
commitfae939f04be00cf7aa798563839f97a1b058e92b (patch)
treec2020462b2049dc571599f34a306df60192e71b4 /FICS
parent4346782e80615b52fbfcccc29619d25d14feef0d (diff)
Reformatted com_announce()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/adminproc.c43
1 files changed, 25 insertions, 18 deletions
diff --git a/FICS/adminproc.c b/FICS/adminproc.c
index 6af9bea..7adcea0 100644
--- a/FICS/adminproc.c
+++ b/FICS/adminproc.c
@@ -1116,26 +1116,33 @@ PUBLIC int com_asetv(int p, param_list param)
* Broadcasts your message to all logged on users. Announcements reach all
* users and cannot be censored in any way (such as by "set shout 0").
*/
-PUBLIC int com_announce(int p, param_list param)
+PUBLIC int
+com_announce(int p, param_list param)
{
- int p1;
- int count = 0;
+ int count = 0;
+ int p1;
- ASSERT(parray[p].adminLevel >= ADMIN_ADMIN);
- 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;
- count++;
- pprintf_prompt(p1, "\n\n **ANNOUNCEMENT** from %s: %s\n\n", parray[p].name, param[0].val.string);
- }
- pprintf(p, "\n(%d) **ANNOUNCEMENT** from %s: %s\n\n", count, parray[p].name, param[0].val.string);
- return COM_OK;
+ ASSERT(parray[p].adminLevel >= ADMIN_ADMIN);
+
+ 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;
+ count++;
+ pprintf_prompt(p1, "\n\n **ANNOUNCEMENT** from %s: %s\n\n",
+ parray[p].name, param[0].val.string);
+ }
+
+ pprintf(p, "\n(%d) **ANNOUNCEMENT** from %s: %s\n\n", count,
+ parray[p].name, param[0].val.string);
+ return COM_OK;
}
/*