summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/bs_act.c5
-rw-r--r--src/core/bs_assign.c42
-rw-r--r--src/core/bs_badwords.c42
-rw-r--r--src/core/bs_bot.c42
-rw-r--r--src/core/bs_botlist.c42
-rw-r--r--src/core/bs_fantasy.c30
-rw-r--r--src/core/bs_fantasy_kick.c39
-rw-r--r--src/core/bs_fantasy_kickban.c38
-rw-r--r--src/core/bs_fantasy_owner.c48
-rw-r--r--src/core/bs_fantasy_seen.c31
-rw-r--r--src/core/bs_help.c40
-rw-r--r--src/core/bs_info.c42
-rw-r--r--src/core/bs_kick.c83
-rw-r--r--src/core/bs_say.c41
-rw-r--r--src/core/bs_set.c90
-rw-r--r--src/core/bs_unassign.c41
16 files changed, 245 insertions, 451 deletions
diff --git a/src/core/bs_act.c b/src/core/bs_act.c
index ef01b190b..2a6e1117d 100644
--- a/src/core/bs_act.c
+++ b/src/core/bs_act.c
@@ -33,11 +33,6 @@ class BSAct : public Module
moduleSetBotHelp(myBotServHelp);
}
-
- ~BSAct()
- {
-
- }
};
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)
diff --git a/src/core/bs_badwords.c b/src/core/bs_badwords.c
index cc6147a9f..35d54037a 100644
--- a/src/core/bs_badwords.c
+++ b/src/core/bs_badwords.c
@@ -21,37 +21,23 @@ int badwords_del_callback(User * u, int num, va_list args);
int badwords_list(User * u, int index, ChannelInfo * ci, int *sent_header);
int badwords_list_callback(User * u, int num, va_list args);
-/**
- * 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)
+class BSBadwords : public Module
{
- Command *c;
-
- moduleAddAuthor("Anope");
- moduleAddVersion("$Id$");
- moduleSetType(CORE);
-
- c = createCommand("BADWORDS", do_badwords, NULL, BOT_HELP_BADWORDS, -1,
- -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
-
- moduleSetBotHelp(myBotServHelp);
-
- return MOD_CONT;
-}
+ public:
+ BSBadwords(const std::string &creator) : Module(creator)
+ {
+ Command *c;
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
-}
+ c = createCommand("BADWORDS", do_badwords, NULL, BOT_HELP_BADWORDS, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ moduleSetBotHelp(myBotServHelp);
+ }
+};
/**
@@ -325,4 +311,4 @@ int badwords_list_callback(User * u, int num, va_list args)
return badwords_list(u, num - 1, ci, sent_header);
}
-MODULE_INIT("bs_badwords")
+MODULE_INIT(BSBadwords)
diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c
index 24f808faa..f9552f5e3 100644
--- a/src/core/bs_bot.c
+++ b/src/core/bs_bot.c
@@ -18,37 +18,23 @@
int do_bot(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)
+class BSBot : public Module
{
- Command *c;
-
- moduleAddAuthor("Anope");
- moduleAddVersion("$Id$");
- moduleSetType(CORE);
-
- c = createCommand("BOT", do_bot, is_services_admin, -1, -1, -1,
- BOT_SERVADMIN_HELP_BOT, BOT_SERVADMIN_HELP_BOT);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
-
- moduleSetBotHelp(myBotServHelp);
-
- return MOD_CONT;
-}
+ public:
+ BSBot(const std::string &creator) : Module(creator)
+ {
+ Command *c;
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
-}
+ c = createCommand("BOT", do_bot, is_services_admin, -1, -1, -1, BOT_SERVADMIN_HELP_BOT, BOT_SERVADMIN_HELP_BOT);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ moduleSetBotHelp(myBotServHelp);
+ }
+};
/**
@@ -348,4 +334,4 @@ int do_bot(User * u)
}
-MODULE_INIT("bs_bot")
+MODULE_INIT(BSBot)
diff --git a/src/core/bs_botlist.c b/src/core/bs_botlist.c
index 4a6efa014..2c7e4bc54 100644
--- a/src/core/bs_botlist.c
+++ b/src/core/bs_botlist.c
@@ -18,36 +18,22 @@
int do_botlist(User * u);
void myBotServHelp(User * u);
-/**
- * Create the botlist 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("BOTLIST", do_botlist, NULL, BOT_HELP_BOTLIST, -1,
- -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
-
- moduleSetBotHelp(myBotServHelp);
-
- return MOD_CONT;
-}
-
-/**
- * Unload the module
- **/
-void AnopeFini(void)
+class BSBotList : public Module
{
+ public:
+ BSBotList(const std::string &creator) : Module(creator)
+ {
+ Command *c;
-}
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
+ c = createCommand("BOTLIST", do_botlist, NULL, BOT_HELP_BOTLIST, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ moduleSetBotHelp(myBotServHelp);
+ }
+};
/**
@@ -107,4 +93,4 @@ int do_botlist(User * u)
return MOD_CONT;
}
-MODULE_INIT("bs_botlist")
+MODULE_INIT(BSBotList)
diff --git a/src/core/bs_fantasy.c b/src/core/bs_fantasy.c
index 1a0a1a7d5..bd57e834b 100644
--- a/src/core/bs_fantasy.c
+++ b/src/core/bs_fantasy.c
@@ -17,24 +17,20 @@
int do_fantasy(int argc, char **argv);
-/**
- * Create the hook, 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 BSFantasy : public Module
{
- EvtHook *hook;
+ public:
+ BSFantasy(const std::string &creator) : Module(creator)
+ {
+ EvtHook *hook;
- moduleAddAuthor("Anope");
- moduleAddVersion("$Id$");
- moduleSetType(CORE);
- hook = createEventHook(EVENT_BOT_FANTASY, do_fantasy);
- moduleAddEventHook(hook);
-
- return MOD_CONT;
-}
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
+ hook = createEventHook(EVENT_BOT_FANTASY, do_fantasy);
+ moduleAddEventHook(hook);
+ }
+};
/**
* Unload the module
@@ -88,4 +84,4 @@ int do_fantasy(int argc, char **argv)
return MOD_CONT;
}
-MODULE_INIT("bs_fantasy")
+MODULE_INIT(BSFantasy)
diff --git a/src/core/bs_fantasy_kick.c b/src/core/bs_fantasy_kick.c
index f9f1af797..2645757c6 100644
--- a/src/core/bs_fantasy_kick.c
+++ b/src/core/bs_fantasy_kick.c
@@ -17,34 +17,21 @@
int do_fantasy(int argc, char **argv);
-/**
- * Create the hook, 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 BSFantasyKick : public Module
{
- EvtHook *hook;
+ public:
+ BSFantasyKick(const std::string &creator) : Module(creator)
+ {
+ EvtHook *hook;
- moduleAddAuthor("Anope");
- moduleAddVersion
- ("$Id$");
- moduleSetType(CORE);
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
- hook = createEventHook(EVENT_BOT_FANTASY, do_fantasy);
- moduleAddEventHook(hook);
-
- return MOD_CONT;
-}
-
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
-
-}
+ hook = createEventHook(EVENT_BOT_FANTASY, do_fantasy);
+ moduleAddEventHook(hook);
+ }
+};
/**
* Handle kick/k fantasy commands.
@@ -97,4 +84,4 @@ int do_fantasy(int argc, char **argv)
return MOD_CONT;
}
-MODULE_INIT("bs_fantasy_kick")
+MODULE_INIT(BSFantasyKick)
diff --git a/src/core/bs_fantasy_kickban.c b/src/core/bs_fantasy_kickban.c
index f8bdc957c..8852bfa5e 100644
--- a/src/core/bs_fantasy_kickban.c
+++ b/src/core/bs_fantasy_kickban.c
@@ -17,34 +17,22 @@
int do_fantasy(int argc, char **argv);
-/**
- * Create the hook, 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 BSFantasyKickBan : public Module
{
- EvtHook *hook;
-
- moduleAddAuthor("Anope");
- moduleAddVersion
- ("$Id$");
- moduleSetType(CORE);
-
- hook = createEventHook(EVENT_BOT_FANTASY, do_fantasy);
- moduleAddEventHook(hook);
+ public:
+ BSFantasyKickBan(const std::string &creator) : Module(creator)
+ {
+ EvtHook *hook;
- return MOD_CONT;
-}
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
+ hook = createEventHook(EVENT_BOT_FANTASY, do_fantasy);
+ moduleAddEventHook(hook);
+ }
+};
-}
/**
* Handle kickban/kb fantasy commands.
@@ -98,4 +86,4 @@ int do_fantasy(int argc, char **argv)
return MOD_CONT;
}
-MODULE_INIT("bs_fantasy_kickban")
+MODULE_INIT(BSFantasyKickBan)
diff --git a/src/core/bs_fantasy_owner.c b/src/core/bs_fantasy_owner.c
index 8ff8c2842..6293bf234 100644
--- a/src/core/bs_fantasy_owner.c
+++ b/src/core/bs_fantasy_owner.c
@@ -17,40 +17,28 @@
int do_fantasy(int argc, char **argv);
-/**
- * Create the hook, 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 BSFantasyOwner : public Module
{
- EvtHook *hook;
+ public:
+ BSFantasyOwner(const std::string &creator) : Module(creator)
+ {
+ EvtHook *hook;
- moduleAddAuthor("Anope");
- moduleAddVersion
- ("$Id$");
- moduleSetType(CORE);
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
- /* No need to load of we don't support owner */
- if (!ircd->owner) {
- alog("Your ircd doesn't support the owner channelmode; bs_fantasy_owner won't be loaded");
- return MOD_STOP;
- }
+ /* No need to load of we don't support owner */
+ if (!ircd->owner)
+ {
+ throw ModuleException("Your ircd doesn't support the owner channelmode; bs_fantasy_owner won't be loaded");
+ }
- hook = createEventHook(EVENT_BOT_FANTASY, do_fantasy);
- moduleAddEventHook(hook);
+ hook = createEventHook(EVENT_BOT_FANTASY, do_fantasy);
+ moduleAddEventHook(hook);
+ }
+};
- return MOD_CONT;
-}
-
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
-
-}
/**
* Handle owner/deowner fantasy commands.
@@ -87,4 +75,4 @@ int do_fantasy(int argc, char **argv)
return MOD_CONT;
}
-MODULE_INIT("bs_fantasy_owner")
+MODULE_INIT(BSFantasyOwner)
diff --git a/src/core/bs_fantasy_seen.c b/src/core/bs_fantasy_seen.c
index f09dbeb92..4861f584c 100644
--- a/src/core/bs_fantasy_seen.c
+++ b/src/core/bs_fantasy_seen.c
@@ -17,26 +17,21 @@
int do_fantasy(int argc, char **argv);
-/**
- * Create the hook, 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 BSFantasySeen : public Module
{
- EvtHook *hook;
+ public:
+ BSFantasySeen(const std::string &creator) : Module(creator)
+ {
+ EvtHook *hook;
- moduleAddAuthor("Anope");
- moduleAddVersion
- ("$Id$");
- moduleSetType(CORE);
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
- hook = createEventHook(EVENT_BOT_FANTASY, do_fantasy);
- moduleAddEventHook(hook);
-
- return MOD_CONT;
-}
+ hook = createEventHook(EVENT_BOT_FANTASY, do_fantasy);
+ moduleAddEventHook(hook);
+ }
+};
/**
* Unload the module
@@ -138,4 +133,4 @@ int do_fantasy(int argc, char **argv)
return MOD_CONT;
}
-MODULE_INIT("bs_fantasy_seen")
+MODULE_INIT(BSFantasySeen)
diff --git a/src/core/bs_help.c b/src/core/bs_help.c
index c2e890ad2..66c5be02d 100644
--- a/src/core/bs_help.c
+++ b/src/core/bs_help.c
@@ -17,34 +17,20 @@
int do_help(User * u);
-/**
- * Create the help 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 BSHelp : public Module
{
- Command *c;
-
- moduleAddAuthor("Anope");
- moduleAddVersion("$Id$");
- moduleSetType(CORE);
- c = createCommand("HELP", do_help, NULL, -1, -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
-
-
- return MOD_CONT;
-}
-
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
-
-}
+ public:
+ BSHelp(const std::string &creator) : Module(creator)
+ {
+ Command *c;
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
+ c = createCommand("HELP", do_help, NULL, -1, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ }
+};
/**
@@ -66,4 +52,4 @@ int do_help(User * u)
return MOD_CONT;
}
-MODULE_INIT("bs_help")
+MODULE_INIT(BSHelp)
diff --git a/src/core/bs_info.c b/src/core/bs_info.c
index 7de46e17c..c7d07ac93 100644
--- a/src/core/bs_info.c
+++ b/src/core/bs_info.c
@@ -19,36 +19,22 @@ int do_info(User * u);
void send_bot_channels(User * u, BotInfo * bi);
void myBotServHelp(User * u);
-/**
- * Create the info 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("INFO", do_info, NULL, BOT_HELP_INFO, -1, -1, -1,
- -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
-
- moduleSetBotHelp(myBotServHelp);
-
- return MOD_CONT;
-}
-
-/**
- * Unload the module
- **/
-void AnopeFini(void)
+class BSInfo : public Module
{
+ public:
+ BSInfo(const std::string &creator) : Module(creator)
+ {
+ Command *c;
-}
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
+ c = createCommand("INFO", do_info, NULL, BOT_HELP_INFO, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ moduleSetBotHelp(myBotServHelp);
+ }
+};
/**
@@ -281,4 +267,4 @@ void send_bot_channels(User * u, BotInfo * bi)
return;
}
-MODULE_INIT("bs_info")
+MODULE_INIT(BSInfo)
diff --git a/src/core/bs_kick.c b/src/core/bs_kick.c
index 98ec85ab5..88d2aedfb 100644
--- a/src/core/bs_kick.c
+++ b/src/core/bs_kick.c
@@ -19,61 +19,38 @@ int do_kickcmd(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)
+class BSKick : public Module
{
- Command *c;
-
- moduleAddAuthor("Anope");
- moduleAddVersion("$Id$");
- moduleSetType(CORE);
- c = createCommand("KICK", do_kickcmd, NULL, BOT_HELP_KICK, -1, -1, -1,
- -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("KICK BADWORDS", NULL, NULL, BOT_HELP_KICK_BADWORDS,
- -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("KICK BOLDS", NULL, NULL, BOT_HELP_KICK_BOLDS, -1,
- -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("KICK CAPS", NULL, NULL, BOT_HELP_KICK_CAPS, -1, -1,
- -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("KICK COLORS", NULL, NULL, BOT_HELP_KICK_COLORS, -1,
- -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("KICK FLOOD", NULL, NULL, BOT_HELP_KICK_FLOOD, -1,
- -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("KICK REPEAT", NULL, NULL, BOT_HELP_KICK_REPEAT, -1,
- -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("KICK REVERSES", NULL, NULL, BOT_HELP_KICK_REVERSES,
- -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("KICK UNDERLINES", NULL, NULL,
- BOT_HELP_KICK_UNDERLINES, -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
-
+ public:
+ BSKick(const std::string &creator) : Module(creator)
+ {
+ Command *c;
- moduleSetBotHelp(myBotServHelp);
-
- return MOD_CONT;
-}
-
-/**
- * Unload the module
- **/
-void AnopeFini(void)
-{
-
-}
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
+ c = createCommand("KICK", do_kickcmd, NULL, BOT_HELP_KICK, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("KICK BADWORDS", NULL, NULL, BOT_HELP_KICK_BADWORDS, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("KICK BOLDS", NULL, NULL, BOT_HELP_KICK_BOLDS, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("KICK CAPS", NULL, NULL, BOT_HELP_KICK_CAPS, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("KICK COLORS", NULL, NULL, BOT_HELP_KICK_COLORS, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("KICK FLOOD", NULL, NULL, BOT_HELP_KICK_FLOOD, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("KICK REPEAT", NULL, NULL, BOT_HELP_KICK_REPEAT, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("KICK REVERSES", NULL, NULL, BOT_HELP_KICK_REVERSES, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("KICK UNDERLINES", NULL, NULL, BOT_HELP_KICK_UNDERLINES, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ moduleSetBotHelp(myBotServHelp);
+ }
+};
/**
@@ -378,4 +355,4 @@ int do_kickcmd(User * u)
return MOD_CONT;
}
-MODULE_INIT("bs_kick")
+MODULE_INIT(BSKick)
diff --git a/src/core/bs_say.c b/src/core/bs_say.c
index dc0d751c5..b7f33c8fe 100644
--- a/src/core/bs_say.c
+++ b/src/core/bs_say.c
@@ -18,35 +18,22 @@
int do_say(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("SAY", do_say, NULL, BOT_HELP_SAY, -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
-
- moduleSetBotHelp(myBotServHelp);
-
- return MOD_CONT;
-}
-
-/**
- * Unload the module
- **/
-void AnopeFini(void)
+class BSSay : public Module
{
+ public:
+ BSSay(const std::string &creator) : Module(creator)
+ {
+ Command *c;
-}
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
+ c = createCommand("SAY", do_say, NULL, BOT_HELP_SAY, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ moduleSetBotHelp(myBotServHelp);
+ }
+};
/**
@@ -96,4 +83,4 @@ int do_say(User * u)
return MOD_CONT;
}
-MODULE_INIT("bs_say")
+MODULE_INIT(BSSay)
diff --git a/src/core/bs_set.c b/src/core/bs_set.c
index 37cd7ac6d..c76d88599 100644
--- a/src/core/bs_set.c
+++ b/src/core/bs_set.c
@@ -18,62 +18,40 @@
int do_set(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("SET", do_set, NULL, BOT_HELP_SET, -1, -1,
- BOT_SERVADMIN_HELP_SET, BOT_SERVADMIN_HELP_SET);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("SET DONTKICKOPS", NULL, NULL,
- BOT_HELP_SET_DONTKICKOPS, -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("SET DONTKICKVOICES", NULL, NULL,
- BOT_HELP_SET_DONTKICKVOICES, -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("SET FANTASY", NULL, NULL, BOT_HELP_SET_FANTASY, -1,
- -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("SET GREET", NULL, NULL, BOT_HELP_SET_GREET, -1, -1,
- -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("SET SYMBIOSIS", NULL, NULL, BOT_HELP_SET_SYMBIOSIS,
- -1, -1, -1, -1);
- c->help_param1 = s_ChanServ;
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("SET NOBOT", NULL, NULL, -1, -1, -1,
- BOT_SERVADMIN_HELP_SET_NOBOT,
- BOT_SERVADMIN_HELP_SET_NOBOT);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
- c = createCommand("SET PRIVATE", NULL, NULL, -1, -1, -1,
- BOT_SERVADMIN_HELP_SET_PRIVATE,
- BOT_SERVADMIN_HELP_SET_PRIVATE);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
-
-
- moduleSetBotHelp(myBotServHelp);
-
- return MOD_CONT;
-}
-
-/**
- * Unload the module
- **/
-void AnopeFini(void)
+class BSSet : public Module
{
-
-}
-
+ public:
+ BSSet(const std::string &creator) : Module(creator)
+ {
+ Command *c;
+
+ moduleAddAuthor("Anope");
+ moduleAddVersion("$Id$");
+ moduleSetType(CORE);
+
+ c = createCommand("SET", do_set, NULL, BOT_HELP_SET, -1, -1, BOT_SERVADMIN_HELP_SET, BOT_SERVADMIN_HELP_SET);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("SET DONTKICKOPS", NULL, NULL, BOT_HELP_SET_DONTKICKOPS, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("SET DONTKICKVOICES", NULL, NULL, BOT_HELP_SET_DONTKICKVOICES, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("SET FANTASY", NULL, NULL, BOT_HELP_SET_FANTASY, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("SET GREET", NULL, NULL, BOT_HELP_SET_GREET, -1, -1, -1, -1);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("SET SYMBIOSIS", NULL, NULL, BOT_HELP_SET_SYMBIOSIS, -1, -1, -1, -1);
+ c->help_param1 = s_ChanServ;
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("SET NOBOT", NULL, NULL, -1, -1, -1, BOT_SERVADMIN_HELP_SET_NOBOT, BOT_SERVADMIN_HELP_SET_NOBOT);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ c = createCommand("SET PRIVATE", NULL, NULL, -1, -1, -1,
+ BOT_SERVADMIN_HELP_SET_PRIVATE,
+ BOT_SERVADMIN_HELP_SET_PRIVATE);
+ moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+
+ moduleSetBotHelp(myBotServHelp);
+ }
+};
/**
@@ -207,4 +185,4 @@ int do_set(User * u)
return MOD_CONT;
}
-MODULE_INIT("bs_set")
+MODULE_INIT(BSSet)
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)