From 5280e648d96fbcb20948f7470afdca8b38f80a44 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Tue, 21 May 2019 22:45:32 +0100 Subject: 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). --- functions.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'functions.c') 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); + } } -- cgit v1.2.3