summaryrefslogtreecommitdiff
path: root/src/core/bs_assign.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/bs_assign.c')
-rw-r--r--src/core/bs_assign.c42
1 files changed, 14 insertions, 28 deletions
diff --git a/src/core/bs_assign.c b/src/core/bs_assign.c
index 37e6d3b45..3e084cef8 100644
--- a/src/core/bs_assign.c
+++ b/src/core/bs_assign.c
@@ -18,36 +18,22 @@
int do_assign(User * u);
void myBotServHelp(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)
-{
- Command *c;
-
- moduleAddAuthor("Anope");
- moduleAddVersion("$Id$");
- moduleSetType(CORE);
- c = createCommand("ASSIGN", do_assign, NULL, BOT_HELP_ASSIGN, -1, -1,
- -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
-
- moduleSetBotHelp(myBotServHelp);
-
- return MOD_CONT;
-}
-
-/**
- * Unload the module
- **/
-void AnopeFini(void)
+class BSAssign : public Module
{
+ public:
+ BSAssign(const std::string &creator) : Module(creator)
+ {
+ Command *c;
-}
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
+ c = createCommand("ASSIGN", do_assign, NULL, BOT_HELP_ASSIGN, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ moduleSetBotHelp(myBotServHelp);
+ }
+};
/**
* Add the help response to Anopes /bs help output.
@@ -94,4 +80,4 @@ int do_assign(User * u)
return MOD_CONT;
}
-MODULE_INIT("bs_assign")
+MODULE_INIT(BSAssign)