summaryrefslogtreecommitdiff
path: root/src/core/hs_on.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hs_on.c')
-rw-r--r--src/core/hs_on.c40
1 files changed, 14 insertions, 26 deletions
diff --git a/src/core/hs_on.c b/src/core/hs_on.c
index 6b12fd8f5..3dc07d6b8 100644
--- a/src/core/hs_on.c
+++ b/src/core/hs_on.c
@@ -18,35 +18,23 @@
int do_on(User * u);
void myHostServHelp(User * u);
-/**
- * Create the off 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 HSOn : public Module
{
- Command *c;
-
- moduleAddAuthor("Anope");
- moduleAddVersion("$Id$");
- moduleSetType(CORE);
+ public:
+ HSOn(const std::string &creator) : Module(creator)
+ {
+ Command *c;
- c = createCommand("ON", do_on, NULL, HOST_HELP_ON, -1, -1, -1, -1);
- moduleAddCommand(HOSTSERV, c, MOD_UNIQUE);
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
- moduleSetHostHelp(myHostServHelp);
-
- return MOD_CONT;
-}
+ c = createCommand("ON", do_on, NULL, HOST_HELP_ON, -1, -1, -1, -1);
+ moduleAddCommand(HOSTSERV, c, MOD_UNIQUE);
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
-
-}
+ moduleSetHostHelp(myHostServHelp);
+ }
+};
@@ -101,4 +89,4 @@ int do_on(User * u)
return MOD_CONT;
}
-MODULE_INIT("hs_on")
+MODULE_INIT(HSOn)