All pastes #565378 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-13 23:49 UTC
rendered paste body
void open_db(void);

int AnopeInit(int argc, char **argv) {
	
	moduleAddAuthor(AUTHOR);
	moduleAddVersion(VERSION);
	
	/* Gather the config values from the config file, or use defaults */
	for (i=0; i < 9; i++) {
		moduleGetConfigDirective(_botkiller_confvals[i]);
	}
	
	/* check and set the configurable options */
	_botkillerdb = _botkillerdb ? _botkillerdb : BOTKILLERDB;
	_botkillernick = _botkillernick ? _botkillernick : BOTKILLERNICK;
	_botkillerident = _botkillerident ? _botkillerident : BOTKILLERNICK;
	_botkillerhost = _botkillerhost ? _botkillerhost : BOTKILLERHOST;
	_botkillerrealname = _botkillerrealname ? _botkillerrealname : BOTKILLERREALNAME;
	_botkillermodes = _botkillermodes ? _botkillermodes : BOTKILLERMODES ? BOTKILLERMODES : ircd->nickservmode;
	_botkillerakilllimit = _botkillerakilllimit ? _botkillerakilllimit : BOTKILLERAKILLLIMIT;
	_botkillerakillone = _botkillerakillone ? _botkillerakillone : BOTKILLERAKILLONE;
	_botkillerakilltwo = _botkillerakilltwo ? _botkillerakilltwo : BOTKILLERAKILLTWO;
	alog("\n[begin cs_trap]\n DB: %s\n Nick: %s\n Ident: %s\n Host: %s\n Real Name: %s\n Modes: %s\n Akill Limit: %s\n Akill Time 1st: %s\n Akill Time 2nd+: %s\n[end cs_trap]\n", _botkillerdb, _botkillernick, _botkillerident, _botkillerhost, _botkillerrealname, _botkillermodes, _botkillerakilllimit, _botkillerakillone, _botkillerakilltwo);
	
	anope_cmd_bot_nick(_botkillernick, _botkillerident, _botkillerhost, _botkillerrealname, _botkillermodes);
	
        wallops(NULL, "\n[cs_trap] before open_db", _botkillerdb);
	open_db();
        wallops(NULL, "\n[cs_trap] after open_db", _botkillerdb);
	
	return MOD_CONT;
}

void open_db(void) {
	
	wallops(NULL, "\n[cs_trap] open_db: %s", _botkillerdb);
	
	alog("\n[cs_trap] open_db: %s", _botkillerdb);

}