aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-04-14 12:39:36 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-04-14 12:39:36 +0200
commitaef8c222e06d023fb4e81c2823f069602de36ee1 (patch)
treeb53135c5bfb8f780a52f83a52560f07e924813cc /FICS
parent480ae9485107b6d91dca3f1c2aa6be0eb96627ca (diff)
Reformatted chtell()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/talkproc.c58
1 files changed, 30 insertions, 28 deletions
diff --git a/FICS/talkproc.c b/FICS/talkproc.c
index 4ccdeb2..2046e2a 100644
--- a/FICS/talkproc.c
+++ b/FICS/talkproc.c
@@ -381,42 +381,44 @@ PUBLIC int com_ptell(int p, param_list param) /*tells partner - doesn't change l
return COM_OK;
}
-PRIVATE int chtell(int p, int ch, char *msg)
+PRIVATE int
+chtell(int p, int ch, char *msg)
{
- int p1, count = 0;
+ int p1, count = 0;
- if ((ch == 0) && (parray[p].adminLevel == 0)) {
- pprintf(p, "Only admins may send tells to channel 0.\n");
- return COM_OK;
- }
+ if (ch == 0 && parray[p].adminLevel == 0) {
+ pprintf(p, "Only admins may send tells to channel 0.\n");
+ return COM_OK;
+ }
- if (ch < 0) {
- pprintf(p, "The lowest channel number is 0.\n");
- return COM_OK;
- }
+ if (ch < 0) {
+ pprintf(p, "The lowest channel number is 0.\n");
+ return COM_OK;
+ }
- if (ch >= MAX_CHANNELS) {
- pprintf(p, "The maximum channel number is %d.\n", MAX_CHANNELS - 1);
- return COM_OK;
- }
+ if (ch >= MAX_CHANNELS) {
+ pprintf(p, "The maximum channel number is %d.\n",
+ (MAX_CHANNELS - 1));
+ return COM_OK;
+ }
- for (p1 = 0; p1 < p_num; p1++) {
- if ((p1 == p) || (parray[p1].status != PLAYER_PROMPT))
- continue;
- if ((on_channel(ch, p1)) && (!player_censored(p1, p))) {
- tell(p, p1, msg, TELL_CHANNEL, ch);
- count++;
- }
- }
+ for (p1 = 0; p1 < p_num; p1++) {
+ if (p1 == p || parray[p1].status != PLAYER_PROMPT)
+ continue;
+ if (on_channel(ch, p1) && !player_censored(p1, p)) {
+ tell(p, p1, msg, TELL_CHANNEL, ch);
+ count++;
+ }
+ }
- if (count)
- parray[p].last_channel = ch;
+ if (count)
+ parray[p].last_channel = ch;
- pprintf(p, "(%d->(%d))\n", ch, count);
- if (!on_channel(ch, p))
- pprintf(p, " (You're not listening to channel %d.)\n", ch);
+ pprintf(p, "(%d->(%d))\n", ch, count);
- return COM_OK;
+ if (!on_channel(ch, p))
+ pprintf(p, " (You're not listening to channel %d.)\n", ch);
+ return COM_OK;
}
PUBLIC int