OFTC sends channel in data part of JOIN - irc - Unnamed repository; edit this f… | |
git clone git://vernunftzentrum.de/irc.git | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit a68ac08f9543bbb869b49f1329fdf9281d412127 | |
parent 8ba4cb0d85f3f438fb3768c0339c43bd16feb6c2 | |
Author: Christian Kellermann <[email protected]> | |
Date: Fri, 30 Mar 2018 22:28:50 +0200 | |
OFTC sends channel in data part of JOIN | |
Diffstat: | |
irc.c | 10 ++++++---- | |
1 file changed, 6 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/irc.c b/irc.c | |
@@ -479,10 +479,12 @@ scmd(char *usr, char *cmd, char *par, char *data) | |
if (!pm) | |
return; | |
pushf(chfind(pm), "-!- %s has left %s", usr, pm); | |
- } else if (!strcmp(cmd, "JOIN")) { | |
- if (!pm) | |
- return; | |
- pushf(chfind(pm), "-!- %s has joined %s", usr, pm); | |
+ } else if (!strcmp(cmd, "JOIN")) { /* some servers pass the channel as… | |
+ if (pm) | |
+ pushf(chfind(pm), "-!- %s has joined %s", usr, pm); | |
+ else if (data) | |
+ pushf(chfind(data), "-!- %s has joined %s", usr, data); | |
+ return; | |
} else if (!strcmp(cmd, "470")) { /* Channel forwarding. */ | |
char *ch = strtok(0, " "), *fch = strtok(0, " "); | |