aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-04-14 10:58:22 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-04-14 10:58:22 +0200
commit80b59b53ae7ebf682dbd9711b7429a83b4183137 (patch)
tree1216ddb0f96007337664eb4ee5dea5ad75a9588a
parent5ac77b889b243a6ee79f470538266e57c1ca6e03 (diff)
Reformatted com_znotify()
-rw-r--r--FICS/talkproc.c68
1 files changed, 39 insertions, 29 deletions
diff --git a/FICS/talkproc.c b/FICS/talkproc.c
index e289b14..60c5d69 100644
--- a/FICS/talkproc.c
+++ b/FICS/talkproc.c
@@ -766,38 +766,48 @@ com_mailmess(int p, param_list param)
return COM_OK;
}
-PUBLIC int com_znotify(int p, param_list param)
+PUBLIC int
+com_znotify(int p, param_list param)
{
- int p1, count = 0;
+ int p1, count = 0;
- for (p1 = 0; p1 < p_num; p1++) {
- if (player_notified(p, p1)) {
- if (!count)
- pprintf(p, "Present company on your notify list:\n ");
- pprintf(p, " %s", parray[p1].name);
- count++;
- }
- }
- if (count)
- pprintf(p, ".\n");
- else
- pprintf(p, "No one from your notify list is logged on.\n");
+ for (p1 = 0; p1 < p_num; p1++) {
+ if (player_notified(p, p1)) {
+ if (!count) {
+ pprintf(p, "Present company on your notify "
+ "list:\n ");
+ }
- count = 0;
- for (p1 = 0; p1 < p_num; p1++) {
- if (player_notified(p1, p) && parray[p1].status == PLAYER_PROMPT) {
- if (!count)
- pprintf(p,
- "The following players have you on their notify list:\n ");
- pprintf(p, " %s", parray[p1].name);
- count++;
- }
- }
- if (count)
- pprintf(p, ".\n");
- else
- pprintf(p, "No one logged in has you on their notify list.\n");
- return COM_OK;
+ pprintf(p, " %s", parray[p1].name);
+ count++;
+ }
+ }
+
+ if (count)
+ pprintf(p, ".\n");
+ else
+ pprintf(p, "No one from your notify list is logged on.\n");
+
+ count = 0;
+
+ for (p1 = 0; p1 < p_num; p1++) {
+ if (player_notified(p1, p) &&
+ parray[p1].status == PLAYER_PROMPT) {
+ if (!count) {
+ pprintf(p, "The following players have you "
+ "on their notify list:\n ");
+ }
+
+ pprintf(p, " %s", parray[p1].name);
+ count++;
+ }
+ }
+
+ if (count)
+ pprintf(p, ".\n");
+ else
+ pprintf(p, "No one logged in has you on their notify list.\n");
+ return COM_OK;
}
PUBLIC int