From 75b2226b0010c3bcd18ad27a3babeb8363ca58d4 Mon Sep 17 00:00:00 2001
From: Markus Uhlin <markus@nifty-networks.net>
Date: Sun, 31 Dec 2023 17:04:38 +0100
Subject: Reformatted player_notify_present()

---
 FICS/playerdb.c | 59 +++++++++++++++++++++++++++++++--------------------------
 1 file changed, 32 insertions(+), 27 deletions(-)

(limited to 'FICS')

diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 558788e..590ac7c 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -1072,35 +1072,40 @@ PUBLIC void player_notify_departure(int p)
   }
 }
 
-PUBLIC int player_notify_present(int p)
-/* output Your arrival was notified by..... */
-/* also notify those with notifiedby set if necessary */
+PUBLIC int
+player_notify_present(int p)
 {
-  int p1;
-  int count = 0;
+	int	count = 0;
+	int	p1;
 
-  if (!parray[p].registered)
-    return count;
-  for (p1 = 0; p1 < p_num; p1++) {
-    if ((player_notified(p, p1)) && (parray[p1].status == PLAYER_PROMPT)) {
-      if (!count) {
-	pprintf(p, "Present company includes:");
-      }
-      count++;
-      pprintf(p, " %s", parray[p1].name);
-      if ((parray[p1].notifiedby) && (!player_notified(p1, p))
-                         && (parray[p1].status == PLAYER_PROMPT)) {
-	if (parray[p1].bell)
-	  pprintf_noformat(p1, "\007");
-	pprintf(p1, "\nNotification: ");
-	pprintf_highlight(p1, "%s", parray[p].name);
-	pprintf_prompt(p1, " has arrived and isn't on your notify list.\n");
-      }
-    }
-  }
-  if (count)
-    pprintf(p, ".\n");
-  return count;
+	if (!parray[p].registered)
+		return count;
+
+	for (p1 = 0; p1 < p_num; p1++) {
+		if (player_notified(p, p1) && parray[p1].status ==
+		    PLAYER_PROMPT) {
+			if (!count)
+				pprintf(p, "Present company includes:");
+			count++;
+
+			pprintf(p, " %s", parray[p1].name);
+
+			if (parray[p1].notifiedby &&
+			    !player_notified(p1, p) &&
+			    parray[p1].status == PLAYER_PROMPT) {
+				if (parray[p1].bell)
+					pprintf_noformat(p1, "\007");
+				pprintf(p1, "\nNotification: ");
+				pprintf_highlight(p1, "%s", parray[p].name);
+				pprintf_prompt(p1, " has arrived and isn't on "
+				    "your notify list.\n");
+			}
+		}
+	}
+
+	if (count)
+		pprintf(p, ".\n");
+	return count;
 }
 
 PUBLIC int
-- 
cgit v1.2.3