diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-04 21:03:14 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-04 21:03:14 +0000 |
commit | bc61c4661b46381de89e867702d490b298985e27 (patch) | |
tree | d8b596ad01f58702067cd2886e96dee242e95b64 /src/core/bs_bot.c | |
parent | 8b20a049b4e5cc90069a68d7c9b0ca5777db2aaf (diff) |
Convert all of core/bs_* to use classes for init..
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1548 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/bs_bot.c')
-rw-r--r-- | src/core/bs_bot.c | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c index 24f808faa..f9552f5e3 100644 --- a/src/core/bs_bot.c +++ b/src/core/bs_bot.c @@ -18,37 +18,23 @@ int do_bot(User * u); void myBotServHelp(User * u); -/** - * Create the command, and tell anope about it. - * @param argc Argument count - * @param argv Argument list - * @return MOD_CONT to allow the module, MOD_STOP to stop it - **/ -int AnopeInit(int argc, char **argv) +class BSBot : public Module { - Command *c; - - moduleAddAuthor("Anope"); - moduleAddVersion("$Id$"); - moduleSetType(CORE); - - c = createCommand("BOT", do_bot, is_services_admin, -1, -1, -1, - BOT_SERVADMIN_HELP_BOT, BOT_SERVADMIN_HELP_BOT); - moduleAddCommand(BOTSERV, c, MOD_UNIQUE); - - moduleSetBotHelp(myBotServHelp); - - return MOD_CONT; -} + public: + BSBot(const std::string &creator) : Module(creator) + { + Command *c; -/** - * Unload the module - **/ -void AnopeFini(void) -{ + moduleAddAuthor("Anope"); + moduleAddVersion("$Id$"); + moduleSetType(CORE); -} + c = createCommand("BOT", do_bot, is_services_admin, -1, -1, -1, BOT_SERVADMIN_HELP_BOT, BOT_SERVADMIN_HELP_BOT); + moduleAddCommand(BOTSERV, c, MOD_UNIQUE); + moduleSetBotHelp(myBotServHelp); + } +}; /** @@ -348,4 +334,4 @@ int do_bot(User * u) } -MODULE_INIT("bs_bot") +MODULE_INIT(BSBot) |