added cmd_set for NeonSpam
[NeonServV5.git] / src / bot_NeonSpam.h
index e350439bbaab0bb93a88cc91d60ac02b7b8c3da3..4cf64a928be5c3231a673b88f573d0be67259179 100644 (file)
 
 #include "main.h"
 
+#define SPAMSETTINGS_SPAMSCAN  0x01
+#define SPAMSETTINGS_FLOODSCAN 0x02
+#define SPAMSETTINGS_JOINSCAN  0x04
+#define SPAMSETTINGS_SCANOPS   0x08
+#define SPAMSETTINGS_SCANVOICE 0x10
+
+#define MAX_FLOOD_AMOUNT 300
+#define MIN_FLOOD_AMOUNT 2
+#define MAX_FLOOD_TIME   200
+
+#define MAX_JOIN_AMOUNT 300
+#define MIN_JOIN_AMOUNT 2
+#define MAX_JOIN_TIME   200
+
+struct NeonSpamSettings {
+    unsigned int flags;
+    unsigned char spam_amount;
+    unsigned char flood_amount;
+    unsigned char flood_time;
+    
+};
+/* PENALTY SYSTEM
+* user gets MAX_FLOOD_TIME points per message
+* points get removed each loop
+* pounts to be removed each second:
+*  MAX_FLOOD_TIME/flood_time
+* 
+* the floodlimit is reached, if the penalty points 
+* are bigger than MAX_FLOOD_TIME * flood_amount
+*/
+
+struct NeonSpamNode {
+    unsigned long lastmsg; //crc32 hash
+    unsigned char spamcount;
+    int floodpenalty;
+    time_t last_penalty_update;
+};
+
 void init_NeonSpam();
 void loop_NeonSpam();
 void free_NeonSpam();