#include "services.h"
#include "log.h"
#include "nickserv.h"
#include "mass.h"
Go to the source code of this file.
Functions | |
void | insert_ad (aMassAd *insert_this) |
Insert a new ad structure into a user mass list. | |
LIST_HEAD (, _mass_ad) masslist | |
void | detect_mass (UserList *nl_from, char *buf, int which) |
handle an incoming message to a MassServ fake client | |
aMassAd * | find_ad (UserList *u, int rcv) |
Cancel mass ad cache from a user. | |
void | expire_ads (void) |
void | flush_ad (UserList *foo) |
void | remove_ad (aMassAd *zap) |
void | unlink_ad (aMassAd *zap) |
char | ranchar (int typ) |
char * | ranstring (char *inbuf, int maxlen, int typ) |
char * | make_clone () |
Make a fake mass client. | |
void | adCloneMaintenance () |
Maintain the advert detection bots' presence and expire old advert information periodically. | |
int | adCheck (UserList *nl_from, char *nm_target, char *args[], int numargs) |
Check if a message is addressed to an ad bot. | |
void | timed_advert_maint (char *a) |
Timed maintenance of the ad detection system, every 5 minutes. | |
Variables | |
char * | massAdClones [5] = {} |
const char | s_MassBot [] = "MassServ" |
Procedures to help rid a network of unauthorized mass ads!
Definition in file mass.c.
|
Check if a message is addressed to an ad bot.
Definition at line 421 of file mass.c. References detect_mass(), and parse_str(). Referenced by parseLine(). |
|
handle an incoming message to a MassServ fake client
Definition at line 59 of file mass.c. References corelog, expire_ads(), find_ad(), flush_ad(), insert_ad(), logDump(), _userlist::nick, oalloc(), _mass_ad::rcvd_by, _mass_ad::sender, sSend(), and _mass_ad::utc. Referenced by adCheck(). |
|
executed on every db expire to flush out mass ads older than 5 minutes Definition at line 134 of file mass.c. References LIST_FIRST, LIST_NEXT, remove_ad(), and _mass_ad::utc. Referenced by detect_mass(), and timed_advert_maint(). |
|
Cancel mass ad cache from a user.
Definition at line 106 of file mass.c. References LIST_FIRST, LIST_NEXT, _mass_ad::rcvd_by, and _mass_ad::sender. Referenced by detect_mass(). |
|
flush_ad(<user>): called when a user quits IRC so we dont leave a dangling ->sender pointer Definition at line 160 of file mass.c. References LIST_FIRST, LIST_NEXT, remove_ad(), and _mass_ad::sender. Referenced by delNick(), and detect_mass(). |
|
used by ranstring Definition at line 208 of file mass.c. Referenced by ranstring(). |
|
this is fun (generate a random string) to be used for massmsg detectors ircname/nicknames/hosts 0 = random nick 1 = random ircname 2 = random user 3 = random host Definition at line 255 of file mass.c. References MIN, and ranchar(). Referenced by make_clone(). |
|
quickly remove a massad from the list and free it. Definition at line 182 of file mass.c. References LIST_REMOVE. Referenced by expire_ads(), and flush_ad(). |
|
unlink a mass ad entry from the masslist without freeing the memory better keep a pointer to it unless you wanna just memleak... Definition at line 197 of file mass.c. References LIST_REMOVE. |