X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmodules%2FNeonSpam.mod%2Fbot_NeonSpam.c;h=5ccfbc2d82138e4028cd5beb6b6da11b12737745;hb=e192ffc0fed753aa5a5c5081674511f90c5a953b;hp=33aa14e1856254e1fe86756d931a93c256c2cde0;hpb=902ebfe5551be2daa3edf8141bcee91f62c0a5e0;p=NeonServV5.git diff --git a/src/modules/NeonSpam.mod/bot_NeonSpam.c b/src/modules/NeonSpam.mod/bot_NeonSpam.c index 33aa14e..5ccfbc2 100644 --- a/src/modules/NeonSpam.mod/bot_NeonSpam.c +++ b/src/modules/NeonSpam.mod/bot_NeonSpam.c @@ -1,4 +1,4 @@ -/* bot_NeonSpam.c - NeonServ v5.3 +/* bot_NeonSpam.c - NeonServ v5.4 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -15,6 +15,7 @@ * along with this program. If not, see . */ #include "../module.h" +#include "../botid.h" #include "bot_NeonSpam.h" #include "../../modcmd.h" @@ -38,7 +39,7 @@ #include "../../bots.h" #include "cmd_neonspam.h" -#define BOTID 2 +#define BOTID NEONSPAM_BOTID #define BOTALIAS "NeonSpam" static const struct default_language_entry msgtab[] = { @@ -234,6 +235,8 @@ int loadNeonSpamSettings(struct ChanNode *chan) { MYSQL_RES *res; MYSQL_ROW row, defaults = NULL; loadChannelSettings(chan); + if(!(chan->flags & CHANFLAG_CHAN_REGISTERED)) + return 0; printf_mysql_query("SELECT `channel_scanner`, `channel_spam_limit`, `channel_spam_except`, `channel_flood_limit`, `channel_flood_time`, `channel_flood_except`, `channel_join_limit`, `channel_join_time`, `channel_join_except`, `channel_caps_percent`, `channel_caps_except`, `channel_digit_percent`, `channel_digit_except` FROM `channels` WHERE `channel_id` = '%d'", chan->channel_id); res = mysql_use(); row = mysql_fetch_row(res);