summaryrefslogtreecommitdiff
path: root/src/core/ms_cancel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ms_cancel.c')
-rw-r--r--src/core/ms_cancel.c41
1 files changed, 14 insertions, 27 deletions
diff --git a/src/core/ms_cancel.c b/src/core/ms_cancel.c
index ceda631df..c6c172673 100644
--- a/src/core/ms_cancel.c
+++ b/src/core/ms_cancel.c
@@ -18,34 +18,21 @@
int do_cancel(User * u);
void myMemoServHelp(User * u);
-/**
- * Create the cancel 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 MSCancel : public Module
{
- Command *c;
-
- moduleAddAuthor("Anope");
- moduleAddVersion("$Id$");
- moduleSetType(CORE);
- c = createCommand("CANCEL", do_cancel, NULL, MEMO_HELP_CANCEL, -1, -1,
- -1, -1);
- moduleAddCommand(MEMOSERV, c, MOD_UNIQUE);
- moduleSetMemoHelp(myMemoServHelp);
-
- return MOD_CONT;
-}
+ public:
+ MSCancel(const std::string &creator) : Module(creator)
+ {
+ Command *c;
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
-
-}
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
+ c = createCommand("CANCEL", do_cancel, NULL, MEMO_HELP_CANCEL, -1, -1, -1, -1);
+ moduleAddCommand(MEMOSERV, c, MOD_UNIQUE);
+ moduleSetMemoHelp(myMemoServHelp);
+ }
+};
@@ -104,4 +91,4 @@ int do_cancel(User * u)
return MOD_CONT;
}
-MODULE_INIT("ms_cancel")
+MODULE_INIT(MSCancel)