From ef85ab7a4f6d54a3b9162e0e0d37cdb8c906a8b7 Mon Sep 17 00:00:00 2001 From: "Robin Burchell w00t@inspircd.org" Date: Tue, 4 Nov 2008 22:07:18 +0000 Subject: Convert all of ChanServ. I feel like Rob mkII! git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1549 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/cs_access.c | 53 +++++++++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 34 deletions(-) (limited to 'src/core/cs_access.c') diff --git a/src/core/cs_access.c b/src/core/cs_access.c index 5d1621972..c4361deba 100644 --- a/src/core/cs_access.c +++ b/src/core/cs_access.c @@ -21,42 +21,27 @@ int do_levels(User * u); void myChanServHelp(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 CSAccess : public Module { - Command *c; - - moduleAddAuthor("Anope"); - moduleAddVersion - ("$Id$"); - moduleSetType(CORE); - - c = createCommand("ACCESS", do_access, NULL, CHAN_HELP_ACCESS, -1, -1, - -1, -1); - moduleAddCommand(CHANSERV, c, MOD_UNIQUE); - c = createCommand("ACCESS LEVELS", NULL, NULL, CHAN_HELP_ACCESS_LEVELS, - -1, -1, -1, -1); - moduleAddCommand(CHANSERV, c, MOD_UNIQUE); - c = createCommand("LEVELS", do_levels, NULL, CHAN_HELP_LEVELS, -1, -1, - -1, -1); - moduleAddCommand(CHANSERV, c, MOD_UNIQUE); - moduleSetChanHelp(myChanServHelp); + public: + CSAccess(const std::string &creator) : Module(creator) + { + Command *c; - return MOD_CONT; -} + moduleAddAuthor("Anope"); + moduleAddVersion + ("$Id$"); + moduleSetType(CORE); -/** - * Unload the module - **/ -void AnopeFini(void) -{ - -} + c = createCommand("ACCESS", do_access, NULL, CHAN_HELP_ACCESS, -1, -1, -1, -1); + moduleAddCommand(CHANSERV, c, MOD_UNIQUE); + c = createCommand("ACCESS LEVELS", NULL, NULL, CHAN_HELP_ACCESS_LEVELS, -1, -1, -1, -1); + moduleAddCommand(CHANSERV, c, MOD_UNIQUE); + c = createCommand("LEVELS", do_levels, NULL, CHAN_HELP_LEVELS, -1, -1, -1, -1); + moduleAddCommand(CHANSERV, c, MOD_UNIQUE); + moduleSetChanHelp(myChanServHelp); + } +}; @@ -542,4 +527,4 @@ int do_levels(User * u) return MOD_CONT; } -MODULE_INIT("cs_access") +MODULE_INIT(CSAccess) -- cgit