diff options
Diffstat (limited to 'src/core/ns_getemail.c')
-rw-r--r-- | src/core/ns_getemail.c | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/src/core/ns_getemail.c b/src/core/ns_getemail.c index 5985fb123..9490d8a17 100644 --- a/src/core/ns_getemail.c +++ b/src/core/ns_getemail.c @@ -23,37 +23,23 @@ int do_getemail(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 NSGetEMail : public Module { - Command *c; - - moduleAddAuthor("Anope"); - moduleAddVersion("$Id$"); - moduleSetType(CORE); + public: + NSGetEMail(const std::string &creator) : Module(creator) + { + Command *c; - c = createCommand("GETEMAIL", do_getemail, is_services_admin, -1, -1, - -1, NICK_SERVADMIN_HELP_GETEMAIL, - NICK_SERVADMIN_HELP_GETEMAIL); - moduleAddCommand(NICKSERV, c, MOD_UNIQUE); + moduleAddAuthor("Anope"); + moduleAddVersion("$Id$"); + moduleSetType(CORE); - moduleSetNickHelp(myNickServHelp); - - return MOD_CONT; -} + c = createCommand("GETEMAIL", do_getemail, is_services_admin, -1, -1, -1, NICK_SERVADMIN_HELP_GETEMAIL, NICK_SERVADMIN_HELP_GETEMAIL); + moduleAddCommand(NICKSERV, c, MOD_UNIQUE); -/** - * Unload the module - **/ -void AnopeFini(void) -{ - -} + moduleSetNickHelp(myNickServHelp); + } +}; /** * Add the help response to anopes /ns help output. @@ -101,4 +87,4 @@ int do_getemail(User * u) return MOD_CONT; } -MODULE_INIT("ns_getemail") +MODULE_INIT(NSGetEMail) |