summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-06-24 13:36:24 -0400
committerJune McEnroe <june@causal.agency>2020-06-24 13:36:24 -0400
commit94fb9798c5476a9a3111f3982f357920b18c2fd0 (patch)
tree7f115ff5bd80a4190081fe02df80f209b950ad27 /chat.h
parentColor mentions up to first ": " rather than just ":" (diff)
downloadcatgirl-94fb9798c5476a9a3111f3982f357920b18c2fd0.tar.gz
catgirl-94fb9798c5476a9a3111f3982f357920b18c2fd0.zip
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);
Enable -Wmissing-prototypesJune McEnroe 2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe 2022-02-19Run line editing testsJune McEnroe 2022-02-18Implement new line editing "library"June McEnroe 2022-02-18Simplify cursor positioning in inputJune McEnroe 2022-02-18Fix M-f orderingJune McEnroe 2022-02-12Move sandman build to scripts/MakefileJune McEnroe 2022-02-12Use compat_readpassphrase.c on LinuxJune McEnroe 2022-02-12Copy RPP defines from oconfigureJune McEnroe