* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define SPAMSERV_CHECK_IGNORE 0
-#define SPAMSERV_CHECK_WARN 1
-#define SPAMSERV_CHECK_PUNISH 2
-
-#define SPAMSERV_MSG_SPAM "Spamming"
-#define SPAMSERV_MSG_FLOOD "Flooding the channel/network"
-#define SPAMSERV_MSG_ADV "Advertising"
-#define SPAMSERV_MSG_JOINFLOOD "Join flooding the channel"
-#define SPAMSERV_MSG_WARNING "%s is against the network rules"
-
static int neonspam_spamscan(struct NeonSpamSettings *settings, struct ChanUser *chanuser, char *message);
static int neonspam_floodscan(struct NeonSpamSettings *settings, struct ChanUser *chanuser);
case SPAMSERV_CHECK_WARN:
if(action == SPAMSERV_CHECK_IGNORE) {
action = result;
- sprintf(reason, SPAMSERV_MSG_WARNING, SPAMSERV_MSG_SPAM);
+ sprintf(reason, SPAMSERV_MSG_WARNING, SPAMSERV_MSG_FLOOD);
}
break;
case SPAMSERV_CHECK_PUNISH:
if(action != SPAMSERV_CHECK_PUNISH) {
action = result;
- sprintf(reason, SPAMSERV_MSG_WARNING, SPAMSERV_MSG_SPAM);
+ sprintf(reason, SPAMSERV_MSG_WARNING, SPAMSERV_MSG_FLOOD);
reaction = "channel_floodreaction";
}
break;
printf_mysql_query("SELECT `%s` FROM `channels` WHERE `channel_id` = '%d'", reaction, chanuser->chan->channel_id);
res = mysql_use();
row = mysql_fetch_row(res);
+ if(!row[0]) {
+ printf_mysql_query("SELECT `%s` FROM `channels` WHERE `channel_name` = 'defaults'", reaction);
+ res = mysql_use();
+ row = mysql_fetch_row(res);
+ }
int duration = 0;
char banmaskBuf[NICKLEN+USERLEN+HOSTLEN+3];
char *banmask = NULL;