+ if(uaccess >= settings->exceptlevel[SPAMSETTINGS_JOINEXCINDEX]) return;
+ //scanops / scanvoiced
+ MYSQL_RES *res;
+ MYSQL_ROW row, defaults = NULL;
+ loadChannelSettings(chanuser->chan);
+ printf_mysql_query("SELECT `channel_flood_reaction`, `channel_flood_reaction_duration`, `channel_getop`, `channel_getvoice` FROM `channels` WHERE `channel_id` = '%d'", chanuser->chan->channel_id);
+ res = mysql_use();
+ row = mysql_fetch_row(res);
+ if(!row[0] || !row[1] || !row[2] || !row[3]) {
+ printf_mysql_query("SELECT `channel_flood_reaction`, `channel_flood_reaction_duration`, `channel_getop`, `channel_getvoice` FROM `channels` WHERE `channel_name` = 'defaults'");
+ res = mysql_use();
+ defaults = mysql_fetch_row(res);
+ }
+ if(!(settings->flags & SPAMSETTINGS_JOINSCAN_OPS) && uaccess >= atoi((row[2] ? row[2] : defaults[2]))) return;
+ if(!(settings->flags & SPAMSETTINGS_JOINSCAN_VOICE) && uaccess >= atoi((row[3] ? row[3] : defaults[3]))) return;
+ char reason[MAXLEN];
+ sprintf(reason, SPAMSERV_MSG_WARNING, SPAMSERV_MSG_JOINFLOOD);