Avoid crashing in opserv_join_check() without an OpServ.
[srvx.git] / 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");