summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
authorC. McEnroe2020-06-24 13:36:24 -0400
committerC. McEnroe2020-06-24 13:36:24 -0400
commit94fb9798c5476a9a3111f3982f357920b18c2fd0 (patch)
tree7f115ff5bd80a4190081fe02df80f209b950ad27 /chat.h
parent4fb94a1a223867af1db5252ab39ccc56c585fccb (diff)
Bump ParamCap to 254
Apparently IRCds have decided that the 15-parameter limit doesn't matter
anymore. 254 is the maximum number of single-byte parameters (following
a single-byte command) which fit in a 512-byte CR-LF-terminated line.
When everyone decides that the 512-byte line length limit doesn't matter
either, I will delete my software and people can use some JavaScript
garbage instead.

This makes struct Message 2080 bytes, but there's only ever one or two
of them around at once. Avoid passing it by value to handle.
Diffstat (limited to 'chat.h')
-rw-r--r--chat.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/chat.h b/chat.h
index 817c381..bb5bec8 100644
--- a/chat.h
+++ b/chat.h
@@ -155,7 +155,7 @@ enum Tag {
 	TagCap,
 };
 
-enum { ParamCap = 15 };
+enum { ParamCap = 254 };
 struct Message {
 	char *tags[TagCap];
 	char *nick;
@@ -204,7 +204,7 @@ extern struct Replies {
 	uint whois;
 } replies;
 
-void handle(struct Message msg);
+void handle(struct Message *msg);
 void command(uint id, char *input);
 const char *commandIsPrivmsg(uint id, const char *input);
 const char *commandIsNotice(uint id, const char *input);