Do not try to moderate join-flood channels with no OpServ.
[srvx.git] / src / opserv.c
index 214aa9325137adb03b92dd79047d7d437040dbb7..3c0c683c20e0749846b38364c053edc12516a006 100644 (file)
@@ -1914,7 +1914,7 @@ opserv_join_check(struct modeNode *mNode)
         struct mod_chanmode change;
         mod_chanmode_init(&change);
         channel->join_flooded = 1;
-        if (opserv_conf.join_flood_moderate && (channel->members.used > opserv_conf.join_flood_moderate_threshold)) {
+       if (opserv && opserv_conf.join_flood_moderate && (channel->members.used > opserv_conf.join_flood_moderate_threshold)) {
             if (!GetUserMode(channel, opserv)) {
                 /* If we aren't in the channel, join it. */
                 change.args[0].mode = MODE_CHANOP;