From e47d169f4961dbcc36014e11a6ead2be0baf62f6 Mon Sep 17 00:00:00 2001 From: "Robin Burchell w00t@inspircd.org" Date: Tue, 4 Nov 2008 23:40:37 +0000 Subject: Convert NickServ git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1556 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/ns_forbid.c | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) (limited to 'src/core/ns_forbid.c') diff --git a/src/core/ns_forbid.c b/src/core/ns_forbid.c index e244c2dc5..9a6ca3941 100644 --- a/src/core/ns_forbid.c +++ b/src/core/ns_forbid.c @@ -19,37 +19,23 @@ int do_forbid(User * u); void myNickServHelp(User * u); NickAlias *makenick(const char *nick); -/** - * 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 NSForbid : public Module { - Command *c; - - moduleAddAuthor("Anope"); - moduleAddVersion("$Id$"); - moduleSetType(CORE); + public: + NSForbid(const std::string &creator) : Module(creator) + { + Command *c; - c = createCommand("FORBID", do_forbid, is_services_admin, -1, -1, -1, - NICK_SERVADMIN_HELP_FORBID, - NICK_SERVADMIN_HELP_FORBID); - moduleAddCommand(NICKSERV, c, MOD_UNIQUE); + moduleAddAuthor("Anope"); + moduleAddVersion("$Id$"); + moduleSetType(CORE); - moduleSetNickHelp(myNickServHelp); - - return MOD_CONT; -} + c = createCommand("FORBID", do_forbid, is_services_admin, -1, -1, -1, NICK_SERVADMIN_HELP_FORBID, NICK_SERVADMIN_HELP_FORBID); + moduleAddCommand(NICKSERV, c, MOD_UNIQUE); -/** - * Unload the module - **/ -void AnopeFini(void) -{ - -} + moduleSetNickHelp(myNickServHelp); + } +}; @@ -154,4 +140,4 @@ NickAlias *makenick(const char *nick) return na; } -MODULE_INIT("ns_forbid") +MODULE_INIT(NSForbid) -- cgit