diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-05 20:20:28 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-05 20:20:28 +0000 |
commit | 88f9975f4071843846ef94d5ad6799e7471a8036 (patch) | |
tree | 2cb619c22d1f979576f5e95b2733b2fd01b7892d /src/modules/cs_tban.c | |
parent | 2ce8f4aea232aac67474cb276918cb41719cf81b (diff) |
Convert src/modules to use the new modules loader.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1559 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules/cs_tban.c')
-rw-r--r-- | src/modules/cs_tban.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/src/modules/cs_tban.c b/src/modules/cs_tban.c index 01f543b08..570ed4d37 100644 --- a/src/modules/cs_tban.c +++ b/src/modules/cs_tban.c @@ -39,32 +39,27 @@ void mAddLanguages(void); #define TBAN_HELP_DETAIL 2 #define TBAN_RESPONSE 3 -int AnopeInit(int argc, char **argv) +class CSTBan : public Module { - Command *c; - int status = 0; + public: + CSTBan(const std::string &creator) : Module(creator) + { + Command *c; - moduleSetChanHelp(myHelp); - c = createCommand("TBAN", do_tban, NULL, -1, -1, -1, -1, -1); - moduleAddHelp(c, myFullHelp); - status = moduleAddCommand(CHANSERV, c, MOD_HEAD); + moduleSetChanHelp(myHelp); + c = createCommand("TBAN", do_tban, NULL, -1, -1, -1, -1, -1); + moduleAddHelp(c, myFullHelp); + moduleAddCommand(CHANSERV, c, MOD_HEAD); - mAddLanguages(); + mAddLanguages(); - moduleAddAuthor(AUTHOR); - moduleAddVersion(VERSION); - moduleSetType(SUPPORTED); + moduleAddAuthor(AUTHOR); + moduleAddVersion(VERSION); + moduleSetType(SUPPORTED); + } +}; - if (status != MOD_ERR_OK) { - return MOD_STOP; - } - return MOD_CONT; -} -void AnopeFini(void) -{ - /* module is unloading */ -} void myHelp(User * u) { @@ -249,4 +244,4 @@ void mAddLanguages(void) /* EOF */ -MODULE_INIT("cs_tban") +MODULE_INIT(CSTBan) |