summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-08-31 14:38:24 -0400
committerJune McEnroe <june@causal.agency>2021-08-31 14:38:24 -0400
commitfe989b8c89a554034a6c82ef643a1c1ec50526c2 (patch)
tree41c3e10e64a0c9df0fa63348ab134dbc989e6c7e
parentCorrect handling of colons in SASL PLAIN (diff)
downloadpounce-fe989b8c89a554034a6c82ef643a1c1ec50526c2.tar.gz
pounce-fe989b8c89a554034a6c82ef643a1c1ec50526c2.zip
Separate stateSync intro messages
So each message can be logged with its prefix. All other calls to
clientFormat and serverFormat write one message at a time.
-rw-r--r--state.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/state.c b/state.c
index e1b49c9..7a12afa 100644
--- a/state.c
+++ b/state.c
@@ -397,14 +397,19 @@ void stateSync(struct Client *client) {
 	);
 
 	clientFormat(
-		client,
-		":%s 001 %s :%s\r\n"
-		":%s 002 %s :%s\r\n"
-		":%s 003 %s :%s\r\n"
-		":%s 004 %s %s %s %s %s%s%s\r\n",
-		intro.origin, self.nick, intro.welcome,
-		intro.origin, self.nick, intro.yourHost,
-		intro.origin, self.nick, intro.created,
+		client, ":%s 001 %s :%s\r\n",
+		intro.origin, self.nick, intro.welcome
+	);
+	clientFormat(
+		client, ":%s 002 %s :%s\r\n",
+		intro.origin, self.nick, intro.yourHost
+	);
+	clientFormat(
+		client, ":%s 003 %s :%s\r\n",
+		intro.origin, self.nick, intro.created
+	);
+	clientFormat(
+		client, ":%s 004 %s %s %s %s %s%s%s\r\n",
 		intro.origin, self.nick,
 		intro.myInfo[0], intro.myInfo[1], intro.myInfo[2], intro.myInfo[3],
 		(intro.myInfo[4] ? " " : ""), (intro.myInfo[4] ? intro.myInfo[4] : "")