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_appendtopic.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_appendtopic.c')
-rw-r--r-- | src/modules/cs_appendtopic.c | 75 |
1 files changed, 32 insertions, 43 deletions
diff --git a/src/modules/cs_appendtopic.c b/src/modules/cs_appendtopic.c index 16b565dd6..2006fcf63 100644 --- a/src/modules/cs_appendtopic.c +++ b/src/modules/cs_appendtopic.c @@ -21,22 +21,22 @@ #define AUTHOR "SGR" #define VERSION "$Id$" - /* ------------------------------------------------------------ - * Name: cs_appendtopic - * Author: SGR <Alex_SGR@ntlworld.com> - * Date: 31/08/2003 - * ------------------------------------------------------------ - * - * This module has no configurable options. For information on - * this module, load it and refer to /ChanServ APPENDTOPIC HELP - * - * Thanks to dengel, Rob and Certus for all there support. - * Especially Rob, who always manages to show me where I have - * not allocated any memory. Even if it takes a few weeks of - * pestering to get him to look at it. - * - * ------------------------------------------------------------ - */ +/* ------------------------------------------------------------ + * Name: cs_appendtopic + * Author: SGR <Alex_SGR@ntlworld.com> + * Date: 31/08/2003 + * ------------------------------------------------------------ + * + * This module has no configurable options. For information on + * this module, load it and refer to /ChanServ APPENDTOPIC HELP + * + * Thanks to dengel, Rob and Certus for all there support. + * Especially Rob, who always manages to show me where I have + * not allocated any memory. Even if it takes a few weeks of + * pestering to get him to look at it. + * + * ------------------------------------------------------------ + */ /* ---------------------------------------------------------------------- */ /* DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING */ @@ -53,36 +53,25 @@ void my_cs_help(User * u); int my_cs_help_appendtopic(User * u); void my_add_languages(void); -int AnopeInit(int argc, char **argv) +class CSAppendTopic : public Module { - Command *c; - int status; - - moduleAddAuthor(AUTHOR); - moduleAddVersion(VERSION); - moduleSetType(SUPPORTED); - - c = createCommand("APPENDTOPIC", my_cs_appendtopic, NULL, -1, -1, -1, - -1, -1); - if ((status = moduleAddCommand(CHANSERV, c, MOD_HEAD))) { - alog("[cs_appendtopic] Unable to create APPENDTOPIC command: %d", - status); - return MOD_STOP; - } - moduleAddHelp(c, my_cs_help_appendtopic); - moduleSetChanHelp(my_cs_help); + public: + CSAppendTopic(const std::string &creator) : Module(creator) + { + Command *c; - my_add_languages(); + moduleAddAuthor(AUTHOR); + moduleAddVersion(VERSION); + moduleSetType(SUPPORTED); - alog("[cs_appendtopic] Loaded successfully"); + c = createCommand("APPENDTOPIC", my_cs_appendtopic, NULL, -1, -1, -1, -1, -1); + moduleAddCommand(CHANSERV, c, MOD_HEAD); + moduleAddHelp(c, my_cs_help_appendtopic); + moduleSetChanHelp(my_cs_help); - return MOD_CONT; -} - -void AnopeFini(void) -{ - alog("[cs_appendtopic] Unloaded successfully"); -} + my_add_languages(); + } +}; void my_cs_help(User * u) { @@ -246,4 +235,4 @@ void my_add_languages(void) /* EOF */ -MODULE_INIT("cs_appendtopic") +MODULE_INIT(CSAppendTopic) |