/* Copy and paste this into your services.conf if you would like to have more control over the bot. ########################################################################### # # BotKiller configuration # ########################################################################### # BotKillerDB [OPTIONAL] # Module: cs_trap # # Use the given filename as database for the Bot Killer tracking system. # If not given, a default will be used. #BotKillerDB "botkill.db" # BotKillerNick [OPTIONAL] # Module: cs_trap # # Nick name of the pseudo client on the IRC network. # If not given, a default will be used. #BotKillerNick "BotKiller" # BotKillerIdent [OPTIONAL] # Module: cs_trap # # Ident of the pseudo client on the IRC network. # If not given, a default will be used. #BotKillerIdent "BotKiller" # BotKillerHost [OPTIONAL] # Module: cs_trap # # Hostname of the pseudo client on the IRC network. # Can be real, a vhost, or fake. # If not given, a default will be used. #BotKillerIdent "I.Kill.Botnet.Drones" # BotKillerRealName [OPTIONAL] # Module: cs_trap # # Real name of the pseudo client on the IRC network. # If not given, a default will be used. #BotKillerRealName "Bot Killer" # BotKillerModes [OPTIONAL] # Module: cs_trap # # Modes of the pseudo client on the IRC network. # If not given, a default will be used. #BotKillerModes "+oBqS" */ #include /* absolute defaults for configureable options*/ #define BOTKILLERDB "botkiller.db" #define BOTKILLERNICK "BotKiller" #define BOTKILLERIDENT "BotKiller" #define BOTKILLERHOST "I.Kill.Botnet.Drones" #define BOTKILLERREALNAME "Bot Killer" #define BOTKILLERMODES NULL /* pointers to the configurable options */ char *_botkillerdb = NULL; char *_botkillernick = NULL; char *_botkillerident = NULL; char *_botkillerhost = NULL; char *_botkillerrealname = NULL; char *_botkillermodes = NULL; /* Directives structure to hold the configurable options */ Directive _botkiller_confvals[] = { { "BotKillerDB", { { PARAM_STRING, PARAM_RELOAD, &_botkillerdb } } }, { "BotKillerNick", { { PARAM_STRING, PARAM_RELOAD, &_botkillernick } } }, { "BotKillerIdent", { { PARAM_STRING, PARAM_RELOAD, &_botkillerident } } }, { "BotKillerHost", { { PARAM_STRING, PARAM_RELOAD, &_botkillerhost } } }, { "BotKillerRealName", { { PARAM_STRING, PARAM_RELOAD, &_botkillerrealname } } }, { "BotKillerModes", { { PARAM_STRING, PARAM_RELOAD, &_botkillermodes } } }, }; #define AUTHOR "Vadtec" #define VERSION "0.0-5a" int AnopeInit(int argc, char **argv) { /* Gather the config values from the config file, or use defaults */ moduleGetConfigDirective(_botkiller_confvals); alog("[begin cs_trap]\n DB: %s\n Nick: %s\n Ident: %s\n Host: %s\n Real Name: %s\n Modes: %s\n[end cs_trap]\n", _botkillerdb, _botkillernick, _botkillerident, _botkillerhost, _botkillerrealname, _botkillermodes); /* 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; alog("[begin cs_trap]\n DB: %s\n Nick: %s\n Ident: %s\n Host: %s\n Real Name: %s\n Modes: %s\n[end cs_trap]\n", _botkillerdb, _botkillernick, _botkillerident, _botkillerhost, _botkillerrealname, _botkillermodes); anope_cmd_bot_nick(_botkillernick, _botkillerident, _botkillerhost, _botkillerrealname, _botkillermodes); moduleAddAuthor(AUTHOR); moduleAddVersion(VERSION); return MOD_CONT; } void AnopeFini(void) { anope_cmd_quit(BOTKILLERNICK, "Shutting down..."); } When I load the module, I should see the config file values for the first block below, but all im getting is the DB value read in. [Jun 11 10:54:16 2007] Trying to load module [cs_trap] [Jun 11 10:54:16 2007] [begin cs_trap] DB: botkill.db Nick: (null) Ident: (null) Host: (null) Real Name: (null) Modes: (null) [end cs_trap] [Jun 11 10:54:16 2007] [begin cs_trap] DB: botkill.db Nick: BotKiller Ident: BotKiller Host: I.Kill.Botnet.Drones Real Name: Bot Killer Modes: +oS [end cs_trap] [Jun 11 10:54:16 2007] Module loading status: 0