diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-04 23:40:37 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-04 23:40:37 +0000 |
commit | e47d169f4961dbcc36014e11a6ead2be0baf62f6 (patch) | |
tree | 40715313b54a628c3849e65ecf89ded5dd0d2198 /src/core/ns_info.c | |
parent | 032e327fcf1a44440ddc767c6df0036b6b5d6a89 (diff) |
Convert NickServ
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1556 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/ns_info.c')
-rw-r--r-- | src/core/ns_info.c | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/src/core/ns_info.c b/src/core/ns_info.c index 829ff826d..f75675085 100644 --- a/src/core/ns_info.c +++ b/src/core/ns_info.c @@ -18,38 +18,25 @@ static int do_info(User * u); void myNickServHelp(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 NSInfo : public Module { - Command *c; - - moduleAddAuthor("Anope"); - moduleAddVersion - ("$Id$"); - moduleSetType(CORE); + public: + NSInfo(const std::string &creator) : Module(creator) + { + Command *c; - c = createCommand("INFO", do_info, NULL, NICK_HELP_INFO, -1, - NICK_HELP_INFO, NICK_SERVADMIN_HELP_INFO, - NICK_SERVADMIN_HELP_INFO); - moduleAddCommand(NICKSERV, c, MOD_UNIQUE); + moduleAddAuthor("Anope"); + moduleAddVersion + ("$Id$"); + moduleSetType(CORE); - moduleSetNickHelp(myNickServHelp); - - return MOD_CONT; -} + c = createCommand("INFO", do_info, NULL, NICK_HELP_INFO, -1, NICK_HELP_INFO, NICK_SERVADMIN_HELP_INFO, NICK_SERVADMIN_HELP_INFO); + moduleAddCommand(NICKSERV, c, MOD_UNIQUE); -/** - * Unload the module - **/ -void AnopeFini(void) -{ + moduleSetNickHelp(myNickServHelp); + } +}; -} @@ -283,4 +270,4 @@ int do_info(User * u) return MOD_CONT; } -MODULE_INIT("ns_info") +MODULE_INIT(NSInfo) |