summaryrefslogtreecommitdiff
path: root/src/core/bs_unassign.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/bs_unassign.c')
-rw-r--r--src/core/bs_unassign.c41
1 files changed, 14 insertions, 27 deletions
diff --git a/src/core/bs_unassign.c b/src/core/bs_unassign.c
index 12804dcd5..f9cc943e3 100644
--- a/src/core/bs_unassign.c
+++ b/src/core/bs_unassign.c
@@ -18,35 +18,22 @@
int do_unassign(User * u);
void myBotServHelp(User * u);
-/**
- * Create the unassign 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 BSUnassign : public Module
{
- Command *c;
-
- moduleAddAuthor("Anope");
- moduleAddVersion("$Id$");
- moduleSetType(CORE);
- c = createCommand("UNASSIGN", do_unassign, NULL, BOT_HELP_UNASSIGN, -1,
- -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ public:
+ BSUnassign(const std::string &creator) : Module(creator)
+ {
+ Command *c;
- moduleSetBotHelp(myBotServHelp);
-
- return MOD_CONT;
-}
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
+ c = createCommand("UNASSIGN", do_unassign, NULL, BOT_HELP_UNASSIGN, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
-
-}
+ moduleSetBotHelp(myBotServHelp);
+ }
+};
@@ -88,4 +75,4 @@ int do_unassign(User * u)
return MOD_CONT;
}
-MODULE_INIT("bs_unassign")
+MODULE_INIT(BSUnassign)