summary refs log tree commit diff stats
path: root/src/common/modes.c
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-08-23 16:34:13 +0100
committerGitHub <noreply@github.com>2021-08-23 10:34:13 -0500
commitef0e67039258b7db11838496c61dbdec0be97f60 (patch)
tree61278e581cc311db93f693747d499fd11e429b3b /src/common/modes.c
parent69ce388a87d5a69280848330f4a2dee63fa21dfb (diff)
Remove some weird guesswork on the 004 numeric. (#2621)
Bahamut and ircu both send 005 MODES and ELIST so this is entirely
unnecessary. The other IRCd checked for here is for a dead network.

While we're editing this code fix HexChat on servers that can only
support one mode at a time (these are mostly gateway servers).
Diffstat (limited to 'src/common/modes.c')
-rw-r--r--src/common/modes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/modes.c b/src/common/modes.c
index 17f9ce99..188d2197 100644
--- a/src/common/modes.c
+++ b/src/common/modes.c
@@ -67,8 +67,8 @@ send_channel_modes (session *sess, char *tbuf, char *word[], int wpos,
 	int usable_modes, orig_len, len, wlen, i, max;
 	server *serv = sess->server;
 
-	/* sanity check. IRC RFC says three per line. */
-	if (serv->modes_per_line < 3)
+	/* sanity check. IRC RFC says three per line but some servers may support less. */
+	if (serv->modes_per_line < 1)
 		serv->modes_per_line = 3;
 	if (modes_per_line < 1)
 		modes_per_line = serv->modes_per_line;