summaryrefslogtreecommitdiff
path: root/src/core/hs_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hs_set.c')
-rw-r--r--src/core/hs_set.c41
1 files changed, 14 insertions, 27 deletions
diff --git a/src/core/hs_set.c b/src/core/hs_set.c
index 26a9141dd..67323b6e1 100644
--- a/src/core/hs_set.c
+++ b/src/core/hs_set.c
@@ -18,36 +18,23 @@
int myDoSet(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 HSSet : public Module
{
- Command *c;
-
- moduleAddAuthor("Anope");
- moduleAddVersion("$Id$");
- moduleSetType(CORE);
+ public:
+ HSSet(const std::string &creator) : Module(creator)
+ {
+ Command *c;
- c = createCommand("SET", myDoSet, is_host_setter, HOST_HELP_SET, -1,
- -1, -1, -1);
- moduleAddCommand(HOSTSERV, c, MOD_UNIQUE);
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
- moduleSetHostHelp(myHostServHelp);
-
- return MOD_CONT;
-}
+ c = createCommand("SET", myDoSet, is_host_setter, HOST_HELP_SET, -1, -1, -1, -1);
+ moduleAddCommand(HOSTSERV, c, MOD_UNIQUE);
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
-
-}
+ moduleSetHostHelp(myHostServHelp);
+ }
+};
@@ -177,4 +164,4 @@ int myDoSet(User * u)
return MOD_CONT;
}
-MODULE_INIT("hs_set")
+MODULE_INIT(HSSet)