X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules%2FNeonSpam.mod%2Fbot_NeonSpam.h;h=1d4c68f6d7249215336447abdcbe8595da18f30f;hp=aaeca2b25a256a60acf22a6d2dece667236d6a4d;hb=3e82313bfb3eaf4f2b59dfc165372e3174be838b;hpb=44af45fb4b2528227e66b05d69d2952c62fce8e9 diff --git a/src/modules/NeonSpam.mod/bot_NeonSpam.h b/src/modules/NeonSpam.mod/bot_NeonSpam.h index aaeca2b..1d4c68f 100644 --- a/src/modules/NeonSpam.mod/bot_NeonSpam.h +++ b/src/modules/NeonSpam.mod/bot_NeonSpam.h @@ -69,17 +69,23 @@ struct ChanNode; #define SPAMSETTINGS_DIGITEXCINDEX 5 #define SPAMSETTINGS_DIGITPERCENTINDEX 1 - -#define SPAMSETTINGS_CHARS SPAMSETTINGS_SPAMCHARS SPAMSETTINGS_FLOODCHARS SPAMSETTINGS_JOINCHARS SPAMSETTINGS_BOTNETCHARS SPAMSETTINGS_CAPSCHARS SPAMSETTINGS_DIGITCHARS -#define SPAMSETTINGS_FLAGS 0x07ffff /* all flags that can be stored in the database */ -#define SPAMSETTINGS_EXCEPTINDEXES 6 +//BADWORDSCAN +#define SPAMSETTINGS_BADWORDSCAN 0x080000 +#define SPAMSETTINGS_BADWORDSCAN_OPS 0x100000 +#define SPAMSETTINGS_BADWORDSCAN_VOICE 0x200000 +#define SPAMSETTINGS_BADWORDCHARS "tuv" +#define SPAMSETTINGS_BADWORDEXCINDEX 6 + +#define SPAMSETTINGS_CHARS SPAMSETTINGS_SPAMCHARS SPAMSETTINGS_FLOODCHARS SPAMSETTINGS_JOINCHARS SPAMSETTINGS_BOTNETCHARS SPAMSETTINGS_CAPSCHARS SPAMSETTINGS_DIGITCHARS SPAMSETTINGS_BADWORDCHARS +#define SPAMSETTINGS_FLAGS 0x7fffff /* all flags that can be stored in the database */ +#define SPAMSETTINGS_EXCEPTINDEXES 7 #define SPAMSETTINGS_SENSIBILITYINDEXES 2 #define SPAMSETTINGS_PERCENTINDEXES 2 //SCRIPT FLAGS -#define SPAMSETTINGS_KICKEDBOTQUEUE 0x080000 -#define SPAMSETTINGS_ISTIMEBAN 0x100000 -#define SPAMSETTINGS_SETTIMEBAN 0x200000 +#define SPAMSETTINGS_KICKEDBOTQUEUE 0x0400000 +#define SPAMSETTINGS_ISTIMEBAN 0x0800000 +#define SPAMSETTINGS_SETTIMEBAN 0x1000000 #define MAX_FLOOD_AMOUNT 300 #define MIN_FLOOD_AMOUNT 2 @@ -108,8 +114,23 @@ struct NeonSpamSettings { time_t lastmsg_time; char *botnicks[BOTNETSCAN_USERS]; - + //badword scan + struct NeonSpamBadword *badwords; }; + +struct NeonSpamBadword { + int id; + char *badword; + unsigned char use_defaults : 1; + unsigned int exceptlevel : 9; + unsigned char scan_ops : 1; + unsigned char scan_voice : 1; + unsigned char use_default_reaction : 1; + unsigned int reaction; + unsigned int reaction_time; + struct NeonSpamBadword *next; +}; + /* PENALTY SYSTEM * user gets MAX_FLOOD_TIME points per message * points get removed each loop