Avoid crashing in opserv_join_check() without an OpServ.
authorMichael Poole <mdpoole@troilus.org>
Sun, 15 Jun 2008 13:24:02 +0000 (09:24 -0400)
committerMichael Poole <mdpoole@troilus.org>
Sun, 15 Jun 2008 13:24:02 +0000 (09:24 -0400)
src/opserv.c (opserv_join_check): Only act on bad channels if we have an
  OpServ bot.

src/opserv.c

index 689b72adec17f51f9769e83a1e8fa7d1737253fe..a661f236854ae9908d672d561137bce81f24becf 100644 (file)
@@ -1982,7 +1982,7 @@ opserv_join_check(struct modeNode *mNode)
 
     dict_foreach(opserv_channel_alerts, alert_check_user, user);
 
-    if (channel->bad_channel) {
+    if (opserv && channel->bad_channel) {
         opserv_debug("Found $b%s$b in bad-word channel $b%s$b; removing the user.", user->nick, channel->name);
         if (channel->name[0] != '#')
             DelUser(user, opserv, 1, "OSMSG_ILLEGAL_KILL_REASON");