X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmodules%2FNeonSpam.mod%2Fbot_NeonSpam.h;h=1d4c68f6d7249215336447abdcbe8595da18f30f;hb=3e82313bfb3eaf4f2b59dfc165372e3174be838b;hp=34a24b5dd9d0a277223b7597ea235e0babeda149;hpb=706e48b1e666054030c491d864f740071e390038;p=NeonServV5.git diff --git a/src/modules/NeonSpam.mod/bot_NeonSpam.h b/src/modules/NeonSpam.mod/bot_NeonSpam.h index 34a24b5..1d4c68f 100644 --- a/src/modules/NeonSpam.mod/bot_NeonSpam.h +++ b/src/modules/NeonSpam.mod/bot_NeonSpam.h @@ -1,4 +1,4 @@ -/* bot_NeonSpam.h - NeonServ v5.3 +/* bot_NeonSpam.h - NeonServ v5.4 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ #ifndef _bot_NeonSpam_h #define _bot_NeonSpam_h -#include "main.h" +#include "../../main.h" struct ChanNode; @@ -69,17 +69,23 @@ struct ChanNode; #define SPAMSETTINGS_DIGITEXCINDEX 5 #define SPAMSETTINGS_DIGITPERCENTINDEX 1 +//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 -#define SPAMSETTINGS_FLAGS 0x07ffff /* all flags that can be stored in the database */ -#define SPAMSETTINGS_EXCEPTINDEXES 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