summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLucentW <lucent@zebes.info>2015-05-13 20:26:14 +0000
committerAlexander Barton <alex@barton.de>2015-05-16 20:29:10 +0200
commit0f490b5caec3439a0e67aa989eea26b352770c94 (patch)
tree2245df025c489468f9570c7d6ed46ba9466d8b75 /src
parenta43d79aeff4d9612588043e2561294faead1ae8a (diff)
downloadngircd-0f490b5caec3439a0e67aa989eea26b352770c94.tar.gz
ngircd-0f490b5caec3439a0e67aa989eea26b352770c94.zip
Implement numeric RPL_LISTSTART(321)
lightIRC and other clients expecting RPL_LISTSTART should now behave correctly.

Closes #207.

(cherry picked from commit 0680ce5fd99bc643651d1433bcdaf271aeb73c46)
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-channel.c4
-rw-r--r--src/ngircd/messages.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c
index c7a3e1b3..4ea25bb0 100644
--- a/src/ngircd/irc-channel.c
+++ b/src/ngircd/irc-channel.c
@@ -597,6 +597,10 @@ IRC_LIST( CLIENT *Client, REQUEST *Req )
 		}
 	}
 
+	/* Send list head */
+	if (!IRC_WriteStrClient(from, RPL_LISTSTART_MSG, Client_ID(from)))
+		return DISCONNECTED;
+
 	while (pattern) {
 		/* Loop through all the channels */
 		if (Req->argc > 0)
diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h
index a5bc2c7a..8eba60ee 100644
--- a/src/ngircd/messages.h
+++ b/src/ngircd/messages.h
@@ -67,6 +67,7 @@
 #define RPL_WHOISIDLE_MSG		"317 %s %s %lu %lu :seconds idle, signon time"
 #define RPL_ENDOFWHOIS_MSG		"318 %s %s :End of WHOIS list"
 #define RPL_WHOISCHANNELS_MSG		"319 %s %s :"
+#define RPL_LISTSTART_MSG		"321 %s Channel :Users  Name"
 #define RPL_LIST_MSG			"322 %s %s %ld :%s"
 #define RPL_LISTEND_MSG			"323 %s :End of LIST"
 #define RPL_CHANNELMODEIS_MSG		"324 %s %s +%s"