]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-channel.c
LUSERS reply: only count "visible" channels
[ngircd-alex.git] / src / ngircd / irc-channel.c
index 476c313835f337b01bb0688c9a9a1e8d97135a83..233e1731fa0e8b8124f0581e2dcb84429c5dbbc6 100644 (file)
@@ -137,6 +137,13 @@ join_allowed(CLIENT *Client, CHANNEL *chan, const char *channame,
                return false;
        }
 
+       if (strchr(channel_modes, 'R') && !strchr(Client_Modes(Client), 'R')) {
+               /* Only registered users are allowed! */
+               IRC_WriteStrClient(Client, ERR_REGONLYCHANNEL_MSG,
+                                  Client_ID(Client), channame);
+               return false;
+       }
+
        return true;
 } /* join_allowed */
 
@@ -526,6 +533,8 @@ IRC_TOPIC( CLIENT *Client, REQUEST *Req )
                                               Client_ID(Client),
                                               Channel_Name(chan), topic);
 #ifndef STRICT_RFC
+                       if (!r)
+                               return r;
                        r = IRC_WriteStrClient(from, RPL_TOPICSETBY_MSG,
                                               Client_ID(Client),
                                               Channel_Name(chan),