summaryrefslogtreecommitdiff
path: root/functions.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-17 22:18:28 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-17 22:18:28 +0100
commit6c4c42c68c53091a0ca04ae6885ed3cc24216348 (patch)
tree8223b896b5da3f8f40cffe4970edf7e85c379cff /functions.h
parent751bee2c2ceb7e9426bf00a669da5679c20ee41a (diff)
Properly support changing our nick while connecting by updating it everywhere including initial server welcome strings.
Make sure channels are cleared when PARTing them. Ignore most commands from clients until they are registered with us. Send the correct current nick when sending NOTICEs.
Diffstat (limited to 'functions.h')
-rw-r--r--functions.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/functions.h b/functions.h
index de631e9..2877bc5 100644
--- a/functions.h
+++ b/functions.h
@@ -14,6 +14,7 @@
#include <sys/select.h>
#define MAXDATASIZE 513 // max number of bytes we can get at once (RFC2812 says 512, plus one for null terminator)
+#define MAXTOKENS 100 // maximum number of (CRLF or space) separated tokens per server response we expect (TODO - check this is reasonable)
// getstdin() return codes
#define OK 0
@@ -38,4 +39,7 @@ void extractnickfromprefix(char *string);
// Update an existing nickuserhost string with a new nick
void updatenickuserhost(char *nickuserhost, char *nick);
+// Update an existing 001 greeting with a new nickuserhost
+void updategreetings(char *greeting001, char *greeting002, char *greeting003, char *greeting004, char *newnickuserhost, char *oldnickuserhost, char *newnick, char *oldnick);
+
#endif