OFTC sends channel in data part of JOIN - irc - Unnamed repository; edit this file 'description' to name the repository.
 (HTM) git clone git://vernunftzentrum.de/irc.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit a68ac08f9543bbb869b49f1329fdf9281d412127
 (DIR) parent 8ba4cb0d85f3f438fb3768c0339c43bd16feb6c2
 (HTM) Author: Christian Kellermann <ckeen@pestilenz.org>
       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(-)
       ---
 (DIR) 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 data :#channel */
       +                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, " ");