summaryrefslogtreecommitdiff
path: root/functions.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-21 22:45:32 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-21 22:45:32 +0100
commit5280e648d96fbcb20948f7470afdca8b38f80a44 (patch)
tree9b1c88d5ba3d92eb96d5ea5654441603e6838a9e /functions.c
parent19b1a1e816e79d621f23e56587ba59c24c9c70cb (diff)
Support multiple nick prefixes in channels by storing/relaying server 005/RPL_ISUPPORT messages and implementing the start of IRCv3 CAP negotiations (multi-prefix only at the moment).
Diffstat (limited to 'functions.c')
-rw-r--r--functions.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/functions.c b/functions.c
index bc4680d..94c653e 100644
--- a/functions.c
+++ b/functions.c
@@ -232,7 +232,7 @@ void updatenickuserhost(char *nickuserhost, char *nick) {
}
// Update existing greeting strings with a new nickuserhost and new nick
-void updategreetings(char *greeting001, char *greeting002, char *greeting003, char *greeting004, char *newnickuserhost, char *oldnickuserhost, char *newnick, char *oldnick) {
+void updategreetings(char *greeting001, char *greeting002, char *greeting003, char *greeting004, char *greeting005a, char *greeting005b, char *greeting005c, char *newnickuserhost, char *oldnickuserhost, char *newnick, char *oldnick) {
printf("updategreetings(): updating greetings with new nickuserhost '%s' and nick '%s'.\n", newnickuserhost, newnick);
// nickuserhost and greeting001's final component first
@@ -278,4 +278,13 @@ void updategreetings(char *greeting001, char *greeting002, char *greeting003, ch
updategreetingnick(greeting002, "002", newnickcpy, oldnick);
updategreetingnick(greeting003, "003", newnickcpy, oldnick);
updategreetingnick(greeting004, "004", newnickcpy, oldnick);
+ if (greeting005a[0]) {
+ updategreetingnick(greeting005a, "005", newnickcpy, oldnick);
+ }
+ if (greeting005b[0]) {
+ updategreetingnick(greeting005b, "005", newnickcpy, oldnick);
+ }
+ if (greeting005c[0]) {
+ updategreetingnick(greeting005c, "005", newnickcpy, oldnick);
+ }
}