#define SPAMSETTINGS_SCANOPS 0x08
#define SPAMSETTINGS_SCANVOICE 0x10
+#define MAX_FLOOD_TIME 200
+
struct NeonSpamSettings {
unsigned int flags;
unsigned char spam_amount;
- unsigned char spam_time;
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 int flags;
+ unsigned long lastmsg; //crc32 hash
+ unsigned char spamcount;
+ int floodpenalty;
+ time_t last_penalty_update;
};
void init_NeonSpam();