*** VERSION 5.6.0 ***
[NeonServV5.git] / src / modules / NeonSpam.mod / bot_NeonSpam.h
index 34a24b5dd9d0a277223b7597ea235e0babeda149..7024986d088613b004bb42906dd1c8810d911790 100644 (file)
@@ -1,4 +1,4 @@
-/* bot_NeonSpam.h - NeonServ v5.3
+/* bot_NeonSpam.h - NeonServ v5.6
  * 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
@@ -140,7 +161,6 @@ struct NeonSpamJoinNode {
 };
 
 void init_NeonSpam(int type);
-void loop_NeonSpam();
 void free_NeonSpam(int type);
 
 void freeNeonSpamSettings(struct NeonSpamSettings *settings);