summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/bs_act.c18
-rw-r--r--src/core/bs_assign.c17
-rw-r--r--src/core/bs_badwords.c17
-rw-r--r--src/core/bs_bot.c20
-rw-r--r--src/core/bs_botlist.c19
-rw-r--r--src/core/bs_help.c2
-rw-r--r--src/core/bs_info.c18
-rw-r--r--src/core/bs_kick.c18
-rw-r--r--src/core/bs_say.c19
-rw-r--r--src/core/bs_set.c18
-rw-r--r--src/core/bs_unassign.c18
-rw-r--r--src/core/cs_access.c20
-rw-r--r--src/core/cs_akick.c21
-rw-r--r--src/core/cs_ban.c20
-rw-r--r--src/core/cs_clear.c17
-rw-r--r--src/core/cs_drop.c18
-rw-r--r--src/core/cs_forbid.c17
-rw-r--r--src/core/cs_getkey.c16
-rw-r--r--src/core/cs_getpass.c15
-rw-r--r--src/core/cs_help.c2
-rw-r--r--src/core/cs_identify.c19
-rw-r--r--src/core/cs_info.c17
-rw-r--r--src/core/cs_invite.c16
-rw-r--r--src/core/cs_kick.c15
-rw-r--r--src/core/cs_list.c21
-rw-r--r--src/core/cs_logout.c16
-rw-r--r--src/core/cs_modes.c51
-rw-r--r--src/core/cs_register.c17
-rw-r--r--src/core/cs_sendpass.c17
-rw-r--r--src/core/cs_set.c11
-rw-r--r--src/core/cs_status.c17
-rw-r--r--src/core/cs_suspend.c19
-rw-r--r--src/core/cs_topic.c17
-rw-r--r--src/core/cs_xop.c24
-rw-r--r--src/core/hs_del.c17
-rw-r--r--src/core/hs_delall.c17
-rw-r--r--src/core/hs_group.c16
-rw-r--r--src/core/hs_help.c2
-rw-r--r--src/core/hs_list.c16
-rw-r--r--src/core/hs_off.c17
-rw-r--r--src/core/hs_on.c17
-rw-r--r--src/core/hs_set.c17
-rw-r--r--src/core/hs_setall.c15
-rw-r--r--src/core/ms_cancel.c14
-rw-r--r--src/core/ms_check.c16
-rw-r--r--src/core/ms_del.c15
-rw-r--r--src/core/ms_help.c2
-rw-r--r--src/core/ms_info.c16
-rw-r--r--src/core/ms_list.c15
-rw-r--r--src/core/ms_read.c15
-rw-r--r--src/core/ms_rsend.c16
-rw-r--r--src/core/ms_send.c16
-rw-r--r--src/core/ms_sendall.c16
-rw-r--r--src/core/ms_set.c17
-rw-r--r--src/core/ms_staff.c16
-rw-r--r--src/core/ns_access.c17
-rw-r--r--src/core/ns_alist.c17
-rw-r--r--src/core/ns_drop.c17
-rw-r--r--src/core/ns_forbid.c16
-rw-r--r--src/core/ns_getemail.c17
-rw-r--r--src/core/ns_getpass.c17
-rw-r--r--src/core/ns_ghost.c17
-rw-r--r--src/core/ns_group.c19
-rw-r--r--src/core/ns_help.c2
-rw-r--r--src/core/ns_identify.c17
-rw-r--r--src/core/ns_info.c17
-rw-r--r--src/core/ns_list.c19
-rw-r--r--src/core/ns_logout.c17
-rw-r--r--src/core/ns_recover.c17
-rw-r--r--src/core/ns_register.c24
-rw-r--r--src/core/ns_release.c17
-rw-r--r--src/core/ns_saset.c17
-rw-r--r--src/core/ns_sendpass.c17
-rw-r--r--src/core/ns_set.c17
-rw-r--r--src/core/ns_status.c17
-rw-r--r--src/core/ns_suspend.c19
-rw-r--r--src/core/ns_update.c17
-rw-r--r--src/core/os_admin.c16
-rw-r--r--src/core/os_akill.c16
-rw-r--r--src/core/os_chankill.c17
-rw-r--r--src/core/os_chanlist.c17
-rw-r--r--src/core/os_clearmodes.c17
-rw-r--r--src/core/os_defcon.c17
-rw-r--r--src/core/os_global.c16
-rw-r--r--src/core/os_help.c2
-rw-r--r--src/core/os_ignore.c17
-rw-r--r--src/core/os_jupe.c17
-rw-r--r--src/core/os_kick.c17
-rw-r--r--src/core/os_mode.c17
-rw-r--r--src/core/os_modinfo.c17
-rw-r--r--src/core/os_modlist.c18
-rw-r--r--src/core/os_modload.c18
-rw-r--r--src/core/os_modunload.c18
-rw-r--r--src/core/os_news.c25
-rw-r--r--src/core/os_noop.c19
-rw-r--r--src/core/os_oline.c19
-rw-r--r--src/core/os_oper.c17
-rw-r--r--src/core/os_quit.c18
-rw-r--r--src/core/os_reload.c18
-rw-r--r--src/core/os_restart.c17
-rw-r--r--src/core/os_session.c19
-rw-r--r--src/core/os_set.c17
-rw-r--r--src/core/os_sgline.c16
-rw-r--r--src/core/os_shutdown.c18
-rw-r--r--src/core/os_sqline.c16
-rw-r--r--src/core/os_staff.c17
-rw-r--r--src/core/os_stats.c17
-rw-r--r--src/core/os_svsnick.c17
-rw-r--r--src/core/os_szline.c16
-rw-r--r--src/core/os_umode.c17
-rw-r--r--src/core/os_update.c18
-rw-r--r--src/core/os_userlist.c18
-rw-r--r--src/module.cpp6
-rw-r--r--src/modules.c60
-rw-r--r--src/modules/cs_appendtopic.c12
-rw-r--r--src/modules/cs_enforce.c14
-rw-r--r--src/modules/cs_tban.c11
-rw-r--r--src/modules/hs_request.c15
-rw-r--r--src/modules/ns_noop_convert.c3
-rw-r--r--src/modules/os_info.c33
120 files changed, 513 insertions, 1523 deletions
diff --git a/src/core/bs_act.c b/src/core/bs_act.c
index 3003e5afa..758ebc82c 100644
--- a/src/core/bs_act.c
+++ b/src/core/bs_act.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myBotServHelp(User * u);
-
class CommandBSAct : public Command
{
public:
@@ -81,19 +79,11 @@ class BSAct : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSAct(), MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_ACT);
}
};
-
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_ACT);
-}
-
MODULE_INIT("bs_act", BSAct)
diff --git a/src/core/bs_assign.c b/src/core/bs_assign.c
index f4b891820..913e68224 100644
--- a/src/core/bs_assign.c
+++ b/src/core/bs_assign.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myBotServHelp(User * u);
-
class CommandBSAssign : public Command
{
public:
@@ -93,18 +91,11 @@ class BSAssign : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSAssign, MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_ASSIGN);
}
};
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_ASSIGN);
-}
-
MODULE_INIT("bs_assign", BSAssign)
diff --git a/src/core/bs_badwords.c b/src/core/bs_badwords.c
index 00d1bace2..627d84569 100644
--- a/src/core/bs_badwords.c
+++ b/src/core/bs_badwords.c
@@ -15,7 +15,6 @@
#include "module.h"
-void myBotServHelp(User * u);
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);
@@ -311,21 +310,13 @@ class BSBadwords : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSBadwords, MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_BADWORDS);
}
};
-
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_BADWORDS);
-}
-
int badwords_del_callback(User * u, int num, va_list args)
{
BadWord *bw;
diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c
index 36aa70b73..dc48cb628 100644
--- a/src/core/bs_bot.c
+++ b/src/core/bs_bot.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myBotServHelp(User * u);
-
class CommandBSBot : public Command
{
private:
@@ -446,21 +444,11 @@ class BSBot : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSBot(), MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_BOT);
}
};
-
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_BOT);
-}
-
-
-
MODULE_INIT("bs_bot", BSBot)
diff --git a/src/core/bs_botlist.c b/src/core/bs_botlist.c
index 190f3d9f9..e363c8545 100644
--- a/src/core/bs_botlist.c
+++ b/src/core/bs_botlist.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myBotServHelp(User * u);
-
class CommandBSBotList : public Command
{
public:
@@ -81,20 +79,11 @@ class BSBotList : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSBotList(), MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_BOTLIST);
}
};
-
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_BOTLIST);
-}
-
-
MODULE_INIT("bs_botlist", BSBotList)
diff --git a/src/core/bs_help.c b/src/core/bs_help.c
index ae26ab9d1..92a595a1d 100644
--- a/src/core/bs_help.c
+++ b/src/core/bs_help.c
@@ -33,7 +33,7 @@ class CommandBSHelp : public Command
{
// Abuse syntax error to display general list help.
notice_help(s_BotServ, u, BOT_HELP);
- moduleDisplayHelp(4, u);
+ moduleDisplayHelp(s_BotServ, u);
notice_help(s_BotServ, u, BOT_HELP_FOOTER, BSMinUsers);
}
};
diff --git a/src/core/bs_info.c b/src/core/bs_info.c
index 36625a731..0541d747e 100644
--- a/src/core/bs_info.c
+++ b/src/core/bs_info.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myBotServHelp(User * u);
-
class CommandBSInfo : public Command
{
private:
@@ -258,19 +256,11 @@ class BSInfo : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSInfo(), MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_INFO);
}
};
-
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_INFO);
-}
-
MODULE_INIT("bs_info", BSInfo)
diff --git a/src/core/bs_kick.c b/src/core/bs_kick.c
index 1e7787f03..a39cb6b6d 100644
--- a/src/core/bs_kick.c
+++ b/src/core/bs_kick.c
@@ -17,7 +17,6 @@
int do_kickcmd(User * u);
-void myBotServHelp(User * u);
class CommandBSKick : public Command
{
public:
@@ -352,20 +351,11 @@ class BSKick : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSKick(), MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_KICK);
}
};
-
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_KICK);
-}
-
-
MODULE_INIT("bs_kick", BSKick)
diff --git a/src/core/bs_say.c b/src/core/bs_say.c
index 153a20eb2..5a262e4b7 100644
--- a/src/core/bs_say.c
+++ b/src/core/bs_say.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myBotServHelp(User * u);
-
class CommandBSSay : public Command
{
public:
@@ -90,20 +88,11 @@ class BSSay : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSSay(), MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_SAY);
}
};
-
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_SAY);
-}
-
-
MODULE_INIT("bs_say", BSSay)
diff --git a/src/core/bs_set.c b/src/core/bs_set.c
index 34d3f66d4..fc939c5c6 100644
--- a/src/core/bs_set.c
+++ b/src/core/bs_set.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myBotServHelp(User * u);
-
class CommandBSSet : public Command
{
public:
@@ -188,19 +186,11 @@ class BSSet : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSSet(), MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_SET);
}
};
-
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_SET);
-}
-
MODULE_INIT("bs_set", BSSet)
diff --git a/src/core/bs_unassign.c b/src/core/bs_unassign.c
index 01ed984b0..64d6fa269 100644
--- a/src/core/bs_unassign.c
+++ b/src/core/bs_unassign.c
@@ -16,7 +16,6 @@
#include "module.h"
int do_unassign(User * u);
-void myBotServHelp(User * u);
class CommandBSUnassign : public Command
{
@@ -66,20 +65,11 @@ class BSUnassign : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSUnassign, MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_UNASSIGN);
}
};
-
-
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_UNASSIGN);
-}
-
MODULE_INIT("bs_unassign", BSUnassign)
diff --git a/src/core/cs_access.c b/src/core/cs_access.c
index ced9bf8ba..ac900d7e1 100644
--- a/src/core/cs_access.c
+++ b/src/core/cs_access.c
@@ -15,20 +15,6 @@
#include "module.h"
-
-void myChanServHelp(User * u);
-
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_ACCESS);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LEVELS);
-}
-
-
static int access_del(User * u, ChannelInfo *ci, ChanAccess * access, int *perm, int uacc)
{
char *nick;
@@ -513,7 +499,11 @@ class CSAccess : public Module
this->AddCommand(CHANSERV, new CommandCSAccess(), MOD_UNIQUE);
this->AddCommand(CHANSERV, new CommandCSLevels(), MOD_UNIQUE);
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_ACCESS);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LEVELS);
}
};
diff --git a/src/core/cs_akick.c b/src/core/cs_akick.c
index 524b80fb5..b3b272437 100644
--- a/src/core/cs_akick.c
+++ b/src/core/cs_akick.c
@@ -15,11 +15,6 @@
#include "module.h"
-
-void myChanServHelp(User * u);
-
-
-
/* Split a usermask up into its constitutent parts. Returned strings are
* malloc()'d, and should be free()'d when done with. Returns "*" for
* missing parts.
@@ -51,16 +46,6 @@ static void split_usermask(const char *mask, const char **nick, const char **use
delete [] mask2;
}
-
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_AKICK);
-}
-
int akick_del(User * u, AutoKick * akick)
{
if (!(akick->flags & AK_USED))
@@ -688,8 +673,10 @@ class CSAKick : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSAKick(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_AKICK);
}
};
diff --git a/src/core/cs_ban.c b/src/core/cs_ban.c
index 3ac9f3174..058c2ad6f 100644
--- a/src/core/cs_ban.c
+++ b/src/core/cs_ban.c
@@ -15,19 +15,6 @@
#include "module.h"
-void myChanServHelp(User * u);
-
-
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_BAN);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_UNBAN);
-}
-
class CommandCSBan : public Command
{
public:
@@ -188,8 +175,11 @@ class CSBan : public Module
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSBan(), MOD_UNIQUE);
this->AddCommand(CHANSERV, new CommandCSUnban(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_BAN);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_UNBAN);
}
};
diff --git a/src/core/cs_clear.c b/src/core/cs_clear.c
index aa17b27d0..52505154f 100644
--- a/src/core/cs_clear.c
+++ b/src/core/cs_clear.c
@@ -15,17 +15,6 @@
#include "module.h"
-void myChanServHelp(User * u);
-
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_CLEAR);
-}
-
class CommandCSClear : public Command
{
public:
@@ -357,8 +346,10 @@ class CSClear : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSClear(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_CLEAR);
}
};
diff --git a/src/core/cs_drop.c b/src/core/cs_drop.c
index 81cae5a5a..25f381a37 100644
--- a/src/core/cs_drop.c
+++ b/src/core/cs_drop.c
@@ -15,18 +15,6 @@
#include "module.h"
-void myChanServHelp(User * u);
-
-
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DROP);
-}
-
class CommandCSDrop : public Command
{
public:
@@ -133,8 +121,10 @@ class CSDrop : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSDrop(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DROP);
}
};
diff --git a/src/core/cs_forbid.c b/src/core/cs_forbid.c
index cf42374b6..dea8ae339 100644
--- a/src/core/cs_forbid.c
+++ b/src/core/cs_forbid.c
@@ -15,17 +15,6 @@
#include "module.h"
-void myChanServHelp(User * u);
-
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_FORBID);
-}
-
class CommandCSForbid : public Command
{
public:
@@ -144,8 +133,10 @@ class CSForbid : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSForbid(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_FORBID);
}
};
diff --git a/src/core/cs_getkey.c b/src/core/cs_getkey.c
index e07850924..cc7e4792f 100644
--- a/src/core/cs_getkey.c
+++ b/src/core/cs_getkey.c
@@ -15,16 +15,6 @@
#include "module.h"
-
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_GETKEY);
-}
-
class CommandCSGetKey : public Command
{
public:
@@ -88,8 +78,10 @@ class CSGetKey : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSGetKey(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_GETKEY);
}
};
diff --git a/src/core/cs_getpass.c b/src/core/cs_getpass.c
index 130f6217b..5d43d7244 100644
--- a/src/core/cs_getpass.c
+++ b/src/core/cs_getpass.c
@@ -15,15 +15,6 @@
#include "module.h"
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_GETPASS);
-}
-
class CommandCSGetPass : public Command
{
public:
@@ -86,12 +77,14 @@ class CSGetPass : public Module
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSGetPass(), MOD_UNIQUE);
- this->SetChanHelp(myChanServHelp);
-
char tmp_pass[PASSMAX];
if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1))
throw ModuleException("Incompatible with the encryption module being used");
}
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_GETPASS);
+ }
};
MODULE_INIT("cs_getpass", CSGetPass)
diff --git a/src/core/cs_help.c b/src/core/cs_help.c
index 3a6d9b5b7..4d7011440 100644
--- a/src/core/cs_help.c
+++ b/src/core/cs_help.c
@@ -54,7 +54,7 @@ class CommandCSHelp : public Command
void OnSyntaxError(User *u)
{
notice_help(s_ChanServ, u, CHAN_HELP);
- moduleDisplayHelp(2, u);
+ moduleDisplayHelp(s_ChanServ, u);
if (CSExpire >= 86400)
notice_help(s_ChanServ, u, CHAN_HELP_EXPIRES, CSExpire / 86400);
if (u->nc && u->nc->IsServicesOper())
diff --git a/src/core/cs_identify.c b/src/core/cs_identify.c
index 59dba5247..ab251eefc 100644
--- a/src/core/cs_identify.c
+++ b/src/core/cs_identify.c
@@ -15,18 +15,6 @@
#include "module.h"
-
-
-
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_IDENTIFY);
-}
-
class CommandCSIdentify : public Command
{
public:
@@ -118,10 +106,11 @@ class CSIdentify : public Module
this->AddCommand(CHANSERV, new CommandCSIdentify("IDENTIFY"), MOD_UNIQUE);
// XXX: we need aliases.
this->AddCommand(CHANSERV, new CommandCSIdentify("ID"), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_IDENTIFY);
}
};
-
MODULE_INIT("cs_identify", CSIdentify)
diff --git a/src/core/cs_info.c b/src/core/cs_info.c
index 5123858af..c92cb0050 100644
--- a/src/core/cs_info.c
+++ b/src/core/cs_info.c
@@ -15,17 +15,6 @@
#include "module.h"
-
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_INFO);
-}
-
-
class CommandCSInfo : public Command
{ // cannot be const, as it is modified.
void CheckOptStr(std::string &buf, int opt, const std::string &str, ChannelInfo *ci, NickCore *nc)
@@ -185,8 +174,10 @@ class CSInfo : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSInfo(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_INFO);
}
};
diff --git a/src/core/cs_invite.c b/src/core/cs_invite.c
index c19823fad..eac5d241c 100644
--- a/src/core/cs_invite.c
+++ b/src/core/cs_invite.c
@@ -15,16 +15,6 @@
#include "module.h"
-
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_INVITE);
-}
-
class CommandCSInvite : public Command
{
public:
@@ -88,8 +78,10 @@ class CSInvite : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSInvite(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_INVITE);
}
};
diff --git a/src/core/cs_kick.c b/src/core/cs_kick.c
index db53e22aa..c14b0f0a3 100644
--- a/src/core/cs_kick.c
+++ b/src/core/cs_kick.c
@@ -15,15 +15,6 @@
#include "module.h"
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_KICK);
-}
-
class CommandCSKick : public Command
{
public:
@@ -112,8 +103,10 @@ class CSKick : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSKick(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_KICK);
}
};
diff --git a/src/core/cs_list.c b/src/core/cs_list.c
index 41b310521..ef1aa4a49 100644
--- a/src/core/cs_list.c
+++ b/src/core/cs_list.c
@@ -16,19 +16,6 @@
#include "module.h"
#include "hashcomp.h"
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- if (!CSListOpersOnly || (is_oper(u)))
- {
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LIST);
- }
-}
-
-
class CommandCSList : public Command
{
public:
@@ -198,7 +185,13 @@ public:
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSList(), MOD_UNIQUE);
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ if (!CSListOpersOnly || (is_oper(u)))
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LIST);
+ }
}
};
diff --git a/src/core/cs_logout.c b/src/core/cs_logout.c
index 81a27c451..ba7c8b8e4 100644
--- a/src/core/cs_logout.c
+++ b/src/core/cs_logout.c
@@ -15,16 +15,6 @@
#include "module.h"
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LOGOUT);
-}
-
-
class CommandCSLogout : public Command
{
private:
@@ -132,8 +122,10 @@ class CSLogout : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSLogout(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LOGOUT);
}
};
diff --git a/src/core/cs_modes.c b/src/core/cs_modes.c
index 8aebedcdf..4baf80039 100644
--- a/src/core/cs_modes.c
+++ b/src/core/cs_modes.c
@@ -15,34 +15,6 @@
#include "module.h"
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User * u)
-{
- if (ircd->owner) {
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_OWNER);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEOWNER);
- }
- if (ircd->protect) {
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_PROTECT);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEPROTECT);
- } else if (ircd->admin) {
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_ADMIN);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEADMIN);
- }
-
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_OP);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEOP);
- if (ircd->halfop) {
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_HALFOP);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEHALFOP);
- }
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_VOICE);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEVOICE);
-}
-
/* do_util: not a command, but does the job of other */
static CommandReturn do_util(User *u, CSModeUtil *util, const char *chan, const char *nick)
@@ -364,8 +336,29 @@ class CSModes : public Module
this->AddCommand(CHANSERV, new CommandCSOwner(), MOD_UNIQUE);
this->AddCommand(CHANSERV, new CommandCSDeOwner(), MOD_UNIQUE);
}
+ }
+ void ChanServHelp(User *u)
+ {
+ if (ircd->owner) {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_OWNER);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEOWNER);
+ }
+ if (ircd->protect) {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_PROTECT);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEPROTECT);
+ } else if (ircd->admin) {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_ADMIN);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEADMIN);
+ }
- this->SetChanHelp(myChanServHelp);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_OP);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEOP);
+ if (ircd->halfop) {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_HALFOP);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEHALFOP);
+ }
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_VOICE);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DEVOICE);
}
};
diff --git a/src/core/cs_register.c b/src/core/cs_register.c
index 096eb32d3..0d8b38cfd 100644
--- a/src/core/cs_register.c
+++ b/src/core/cs_register.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myChanServHelp(User * u);
-
class CommandCSRegister : public Command
{
public:
@@ -150,18 +148,11 @@ class CSRegister : public Module
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSRegister(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_REGISTER);
}
};
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User *u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_REGISTER);
-}
-
MODULE_INIT("cs_register", CSRegister)
diff --git a/src/core/cs_sendpass.c b/src/core/cs_sendpass.c
index b6d130cdb..95d723ce5 100644
--- a/src/core/cs_sendpass.c
+++ b/src/core/cs_sendpass.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myChanServHelp(User *u);
-
class CommandCSSendPass : public Command
{
public:
@@ -97,8 +95,6 @@ class CSSendPass : public Module
this->AddCommand(CHANSERV, new CommandCSSendPass(), MOD_UNIQUE);
- this->SetChanHelp(myChanServHelp);
-
if (!UseMail)
throw ModuleException("sendpass may not be loaded if UseMail is loaded");
@@ -106,15 +102,10 @@ class CSSendPass : public Module
if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1))
throw ModuleException("Incompatible with the encryption module being used");
}
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SENDPASS);
+ }
};
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User *u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SENDPASS);
-}
-
MODULE_INIT("cs_sendpass", CSSendPass)
diff --git a/src/core/cs_set.c b/src/core/cs_set.c
index 57f87ca55..6e442d4d1 100644
--- a/src/core/cs_set.c
+++ b/src/core/cs_set.c
@@ -725,11 +725,6 @@ class CommandCSSet : public Command
}
};
-void myChanServHelp(User * u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SET);
-}
-
class CSSet : public Module
{
public:
@@ -739,9 +734,11 @@ class CSSet : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSSet(), MOD_UNIQUE);
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SET);
}
};
-
MODULE_INIT("cs_set", CSSet)
diff --git a/src/core/cs_status.c b/src/core/cs_status.c
index 1bca1483f..5af819563 100644
--- a/src/core/cs_status.c
+++ b/src/core/cs_status.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myChanServHelp(User *u);
-
class CommandCSStatus : public Command
{
public:
@@ -73,18 +71,11 @@ class CSStatus : public Module
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSStatus(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_STATUS);
}
};
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User *u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_STATUS);
-}
-
MODULE_INIT("cs_status", CSStatus)
diff --git a/src/core/cs_suspend.c b/src/core/cs_suspend.c
index 161471382..cd6cb99e1 100644
--- a/src/core/cs_suspend.c
+++ b/src/core/cs_suspend.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myChanServHelp(User *u);
-
class CommandCSSuspend : public Command
{
public:
@@ -208,19 +206,12 @@ class CSSuspend : public Module
this->AddCommand(CHANSERV, new CommandCSSuspend(), MOD_UNIQUE);
this->AddCommand(CHANSERV, new CommandCSUnSuspend(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SUSPEND);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_UNSUSPEND);
}
};
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User *u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SUSPEND);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_UNSUSPEND);
-}
-
MODULE_INIT("cs_suspend", CSSuspend)
diff --git a/src/core/cs_topic.c b/src/core/cs_topic.c
index 54a49ab59..5d603bae7 100644
--- a/src/core/cs_topic.c
+++ b/src/core/cs_topic.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myChanServHelp(User *u);
-
class CommandCSTopic : public Command
{
public:
@@ -91,18 +89,11 @@ class CSTopic : public Module
this->SetType(CORE);
this->AddCommand(CHANSERV, new CommandCSTopic(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_TOPIC);
}
};
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User *u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_TOPIC);
-}
-
MODULE_INIT("cs_topic", CSTopic)
diff --git a/src/core/cs_xop.c b/src/core/cs_xop.c
index 6cf790851..fa63f60e9 100644
--- a/src/core/cs_xop.c
+++ b/src/core/cs_xop.c
@@ -18,7 +18,6 @@
int xop_del_callback(User *u, int num, va_list args);
int xop_list_callback(User *u, int num, va_list args);
int xop_list(User *u, int index, ChannelInfo *ci, int *sent_header, int xlev, int xmsg);
-void myChanServHelp(User *u);
enum
{
@@ -506,24 +505,17 @@ class CSXOP : public Module
this->AddCommand(CHANSERV, new CommandCSHOP(), MOD_UNIQUE);
this->AddCommand(CHANSERV, new CommandCSSOP(), MOD_UNIQUE);
this->AddCommand(CHANSERV, new CommandCSVOP(), MOD_UNIQUE);
-
- this->SetChanHelp(myChanServHelp);
+ }
+ void ChanServHelp(User *u)
+ {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SOP);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_AOP);
+ if (ircd->halfop)
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_HOP);
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_VOP);
}
};
-/**
- * Add the help response to anopes /cs help output.
- * @param u The user who is requesting help
- **/
-void myChanServHelp(User *u)
-{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SOP);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_AOP);
- if (ircd->halfop)
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_HOP);
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_VOP);
-}
-
/* `last' is set to the last index this routine was called with
* `perm' is incremented whenever a permission-denied error occurs
*/
diff --git a/src/core/hs_del.c b/src/core/hs_del.c
index c0d0ae40c..d86c87f41 100644
--- a/src/core/hs_del.c
+++ b/src/core/hs_del.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myHostServHelp(User *u);
-
class CommandHSDel : public Command
{
public:
@@ -72,18 +70,11 @@ class HSDel : public Module
this->SetType(CORE);
this->AddCommand(HOSTSERV, new CommandHSDel(), MOD_UNIQUE);
-
- this->SetHostHelp(myHostServHelp);
+ }
+ void HostServHelp(User *u)
+ {
+ notice_lang(s_HostServ, u, HOST_HELP_CMD_DEL);
}
};
-/**
- * Add the help response to anopes /hs help output.
- * @param u The user who is requesting help
- **/
-void myHostServHelp(User *u)
-{
- notice_lang(s_HostServ, u, HOST_HELP_CMD_DEL);
-}
-
MODULE_INIT("hs_del", HSDel)
diff --git a/src/core/hs_delall.c b/src/core/hs_delall.c
index 4de865ebe..8ffb4a059 100644
--- a/src/core/hs_delall.c
+++ b/src/core/hs_delall.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myHostServHelp(User *u);
-
class CommandHSDelAll : public Command
{
public:
@@ -79,18 +77,11 @@ class HSDelAll : public Module
this->SetType(CORE);
this->AddCommand(HOSTSERV, new CommandHSDelAll(), MOD_UNIQUE);
-
- this->SetHostHelp(myHostServHelp);
+ }
+ void HostServHelp(User *u)
+ {
+ notice_lang(s_HostServ, u, HOST_HELP_CMD_DELALL);
}
};
-/**
- * Add the help response to anopes /hs help output.
- * @param u The user who is requesting help
- **/
-void myHostServHelp(User *u)
-{
- notice_lang(s_HostServ, u, HOST_HELP_CMD_DELALL);
-}
-
MODULE_INIT("hs_delall", HSDelAll)
diff --git a/src/core/hs_group.c b/src/core/hs_group.c
index 3379c2a1a..573f1be66 100644
--- a/src/core/hs_group.c
+++ b/src/core/hs_group.c
@@ -15,7 +15,6 @@
#include "module.h"
-void myHostServHelp(User *u);
extern int do_hs_sync(NickCore *nc, char *vIdent, char *hostmask, char *creator, time_t time);
class CommandHSGroup : public Command
@@ -94,18 +93,11 @@ class HSGroup : public Module
this->SetType(CORE);
this->AddCommand(HOSTSERV, new CommandHSGroup(), MOD_UNIQUE);
-
- this->SetHostHelp(myHostServHelp);
+ }
+ void HostServHelp(User *u)
+ {
+ notice_lang(s_HostServ, u, HOST_HELP_CMD_GROUP);
}
};
-/**
- * Add the help response to anopes /hs help output.
- * @param u The user who is requesting help
- **/
-void myHostServHelp(User *u)
-{
- notice_lang(s_HostServ, u, HOST_HELP_CMD_GROUP);
-}
-
MODULE_INIT("hs_group", HSGroup)
diff --git a/src/core/hs_help.c b/src/core/hs_help.c
index 86c12223d..ca1f689ae 100644
--- a/src/core/hs_help.c
+++ b/src/core/hs_help.c
@@ -32,7 +32,7 @@ class CommandHSHelp : public Command
void OnSyntaxError(User *u)
{
notice_help(s_HostServ, u, HOST_HELP, s_HostServ);
- moduleDisplayHelp(6, u);
+ moduleDisplayHelp(s_HostServ, u);
}
};
diff --git a/src/core/hs_list.c b/src/core/hs_list.c
index ec678df7a..c12ef5907 100644
--- a/src/core/hs_list.c
+++ b/src/core/hs_list.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myHostServHelp(User *u);
-
class CommandHSList : public Command
{
public:
@@ -154,17 +152,11 @@ class HSList : public Module
this->SetType(CORE);
this->AddCommand(HOSTSERV, new CommandHSList(), MOD_UNIQUE);
- this->SetHostHelp(myHostServHelp);
+ }
+ void HostServHelp(User *u)
+ {
+ notice_lang(s_HostServ, u, HOST_HELP_CMD_LIST);
}
};
-/**
- * Add the help response to anopes /hs help output.
- * @param u The user who is requesting help
- **/
-void myHostServHelp(User *u)
-{
- notice_lang(s_HostServ, u, HOST_HELP_CMD_LIST);
-}
-
MODULE_INIT("hs_list", HSList)
diff --git a/src/core/hs_off.c b/src/core/hs_off.c
index f44b0e5a9..18bf25857 100644
--- a/src/core/hs_off.c
+++ b/src/core/hs_off.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myHostServHelp(User *u);
-
class CommandHSOff : public Command
{
public:
@@ -65,18 +63,11 @@ class HSOff : public Module
this->SetType(CORE);
this->AddCommand(HOSTSERV, new CommandHSOff(), MOD_UNIQUE);
-
- this->SetHostHelp(myHostServHelp);
+ }
+ void HostServHelp(User *u)
+ {
+ notice_lang(s_HostServ, u, HOST_HELP_CMD_OFF);
}
};
-/**
- * Add the help response to anopes /hs help output.
- * @param u The user who is requesting help
- **/
-void myHostServHelp(User *u)
-{
- notice_lang(s_HostServ, u, HOST_HELP_CMD_OFF);
-}
-
MODULE_INIT("hs_off", HSOff)
diff --git a/src/core/hs_on.c b/src/core/hs_on.c
index 9286023b2..8255150da 100644
--- a/src/core/hs_on.c
+++ b/src/core/hs_on.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myHostServHelp(User *u);
-
class CommandHSOn : public Command
{
public:
@@ -79,18 +77,11 @@ class HSOn : public Module
this->SetType(CORE);
this->AddCommand(HOSTSERV, new CommandHSOn(), MOD_UNIQUE);
-
- this->SetHostHelp(myHostServHelp);
+ }
+ void HostServHelp(User *u)
+ {
+ notice_lang(s_HostServ, u, HOST_HELP_CMD_ON);
}
};
-/**
- * Add the help response to anopes /hs help output.
- * @param u The user who is requesting help
- **/
-void myHostServHelp(User *u)
-{
- notice_lang(s_HostServ, u, HOST_HELP_CMD_ON);
-}
-
MODULE_INIT("hs_on", HSOn)
diff --git a/src/core/hs_set.c b/src/core/hs_set.c
index a117f7540..062c758cf 100644
--- a/src/core/hs_set.c
+++ b/src/core/hs_set.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myHostServHelp(User *u);
-
class CommandHSSet : public Command
{
public:
@@ -169,18 +167,11 @@ class HSSet : public Module
this->SetType(CORE);
this->AddCommand(HOSTSERV, new CommandHSSet(), MOD_UNIQUE);
-
- this->SetHostHelp(myHostServHelp);
+ }
+ void HostServHelp(User *u)
+ {
+ notice_lang(s_HostServ, u, HOST_HELP_CMD_SET);
}
};
-/**
- * Add the help response to anopes /hs help output.
- * @param u The user who is requesting help
- **/
-void myHostServHelp(User *u)
-{
- notice_lang(s_HostServ, u, HOST_HELP_CMD_SET);
-}
-
MODULE_INIT("hs_set", HSSet)
diff --git a/src/core/hs_setall.c b/src/core/hs_setall.c
index 1177ca5d8..05707c39a 100644
--- a/src/core/hs_setall.c
+++ b/src/core/hs_setall.c
@@ -15,7 +15,6 @@
#include "module.h"
-void myHostServHelp(User *u);
extern int do_hs_sync(NickCore *nc, char *vIdent, char *hostmask, char *creator, time_t time);
class CommandHSSetAll : public Command
@@ -169,17 +168,11 @@ class HSSetAll : public Module
this->SetType(CORE);
this->AddCommand(HOSTSERV, new CommandHSSetAll(), MOD_UNIQUE);
- this->SetHostHelp(myHostServHelp);
+ }
+ void HostServHelp(User *u)
+ {
+ notice_lang(s_HostServ, u, HOST_HELP_CMD_SETALL);
}
};
-/**
- * Add the help response to anopes /hs help output.
- * @param u The user who is requesting help
- **/
-void myHostServHelp(User *u)
-{
- notice_lang(s_HostServ, u, HOST_HELP_CMD_SETALL);
-}
-
MODULE_INIT("hs_setall", HSSetAll)
diff --git a/src/core/ms_cancel.c b/src/core/ms_cancel.c
index 48867563e..0991303dc 100644
--- a/src/core/ms_cancel.c
+++ b/src/core/ms_cancel.c
@@ -80,17 +80,11 @@ class MSCancel : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSCancel(), MOD_UNIQUE);
- this->SetMemoHelp(myMemoServHelp);
+ }
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_CANCEL);
}
};
-/**
- * Add the help response to anopes /ms help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_CANCEL);
-}
-
MODULE_INIT("ms_cancel", MSCancel)
diff --git a/src/core/ms_check.c b/src/core/ms_check.c
index 19f376873..cfb331709 100644
--- a/src/core/ms_check.c
+++ b/src/core/ms_check.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myMemoServHelp(User *u);
-
class CommandMSCheck : public Command
{
public:
@@ -99,17 +97,11 @@ class MSCheck : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSCheck(), MOD_UNIQUE);
- this->SetMemoHelp(myMemoServHelp);
+ }
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_CHECK);
}
};
-/**
- * Add the help response to anopes /ms help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_CHECK);
-}
-
MODULE_INIT("ms_check", MSCheck)
diff --git a/src/core/ms_del.c b/src/core/ms_del.c
index d3eea944a..a8c5bccd1 100644
--- a/src/core/ms_del.c
+++ b/src/core/ms_del.c
@@ -16,7 +16,6 @@
#include "module.h"
int del_memo_callback(User *u, int num, va_list args);
-void myMemoServHelp(User *u);
class CommandMSDel : public Command
{
@@ -158,20 +157,14 @@ class MSDel : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSDel(), MOD_UNIQUE);
- this->SetMemoHelp(myMemoServHelp);
+ }
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_DEL);
}
};
/**
- * Add the help response to anopes /ms help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_DEL);
-}
-
-/**
* Delete a single memo from a MemoInfo. callback function
* @param u User Struct
* @param int Number
diff --git a/src/core/ms_help.c b/src/core/ms_help.c
index 20471a1c4..382f571dc 100644
--- a/src/core/ms_help.c
+++ b/src/core/ms_help.c
@@ -32,7 +32,7 @@ class CommandMSHelp : public Command
void OnSyntaxError(User *u)
{
notice_help(s_MemoServ, u, MEMO_HELP_HEADER);
- moduleDisplayHelp(3, u);
+ moduleDisplayHelp(s_MemoServ, u);
notice_help(s_MemoServ, u, MEMO_HELP_FOOTER, s_ChanServ);
}
};
diff --git a/src/core/ms_info.c b/src/core/ms_info.c
index 41bfffd61..9d87b019f 100644
--- a/src/core/ms_info.c
+++ b/src/core/ms_info.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myMemoServHelp(User *u);
-
class CommandMSInfo : public Command
{
public:
@@ -218,17 +216,11 @@ class MSInfo : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSInfo(), MOD_UNIQUE);
- this->SetMemoHelp(myMemoServHelp);
+ }
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_INFO);
}
};
-/**
- * Add the help response to anopes /ms help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_INFO);
-}
-
MODULE_INIT("ms_info", MSInfo)
diff --git a/src/core/ms_list.c b/src/core/ms_list.c
index 85cd21047..4ade2fd5e 100644
--- a/src/core/ms_list.c
+++ b/src/core/ms_list.c
@@ -17,7 +17,6 @@
int list_memo_callback(User *u, int num, va_list args);
int list_memo(User *u, int index, MemoInfo *mi, int *sent_header, int newi, const char *chan);
-void myMemoServHelp(User *u);
class CommandMSList : public Command
{
@@ -124,20 +123,14 @@ class MSList : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSList(), MOD_UNIQUE);
- this->SetMemoHelp(myMemoServHelp);
+ }
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_LIST);
}
};
/**
- * Add the help response to anopes /ms help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_LIST);
-}
-
-/**
* list memno callback function
* @param u User Struct
* @param int Memo number
diff --git a/src/core/ms_read.c b/src/core/ms_read.c
index 15c968b94..fe5a959eb 100644
--- a/src/core/ms_read.c
+++ b/src/core/ms_read.c
@@ -17,7 +17,6 @@
int read_memo_callback(User *u, int num, va_list args);
int read_memo(User *u, int index, MemoInfo *mi, const char *chan);
-void myMemoServHelp(User *u);
extern void rsend_notify(User *u, Memo *m, const char *chan);
class CommandMSRead : public Command
@@ -131,20 +130,14 @@ class MSRead : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSRead(), MOD_UNIQUE);
- this->SetMemoHelp(myMemoServHelp);
+ }
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_READ);
}
};
/**
- * Add the help response to anopes /ms help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_READ);
-}
-
-/**
* Read a memo callback function
* @param u User Struct
* @param int Index number
diff --git a/src/core/ms_rsend.c b/src/core/ms_rsend.c
index 80950c9eb..999a2f4bd 100644
--- a/src/core/ms_rsend.c
+++ b/src/core/ms_rsend.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myMemoServHelp(User *u);
-
class CommandMSRSend : public Command
{
public:
@@ -89,20 +87,14 @@ class MSRSend : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSRSend(), MOD_UNIQUE);
- this->SetMemoHelp(myMemoServHelp);
if (!MSMemoReceipt)
throw ModuleException("Don't like memo reciepts, or something.");
}
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_RSEND);
+ }
};
-/**
- * Add the help response to anopes /ms help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_RSEND);
-}
-
MODULE_INIT("ms_rsend", MSRSend)
diff --git a/src/core/ms_send.c b/src/core/ms_send.c
index fcc0bdf0b..9c9db1c7a 100644
--- a/src/core/ms_send.c
+++ b/src/core/ms_send.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myMemoServHelp(User *u);
-
class CommandMSSend : public Command
{
public:
@@ -54,17 +52,11 @@ class MSSend : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSSend(), MOD_UNIQUE);
- this->SetMemoHelp(myMemoServHelp);
+ }
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SEND);
}
};
-/**
- * Add the help response to anopes /ms help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SEND);
-}
-
MODULE_INIT("ms_send", MSSend)
diff --git a/src/core/ms_sendall.c b/src/core/ms_sendall.c
index bdfa89045..aa1eee790 100644
--- a/src/core/ms_sendall.c
+++ b/src/core/ms_sendall.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myMemoServHelp(User *u);
-
class CommandMSSendAll : public Command
{
public:
@@ -81,17 +79,11 @@ class MSSendAll : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSSendAll(), MOD_UNIQUE);
- this->SetMemoHelp(myMemoServHelp);
+ }
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SENDALL);
}
};
-/**
- * Add the help response to anopes /ms help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SENDALL);
-}
-
MODULE_INIT("ms_sendall", MSSendAll)
diff --git a/src/core/ms_set.c b/src/core/ms_set.c
index a9922aae8..4d96b355e 100644
--- a/src/core/ms_set.c
+++ b/src/core/ms_set.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myMemoServHelp(User *u);
-
class CommandMSSet : public Command
{
private:
@@ -266,18 +264,11 @@ class MSSet : public Module
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSSet(), MOD_UNIQUE);
-
- this->SetMemoHelp(myMemoServHelp);
+ }
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SET);
}
};
-/**
- * Add the help response to anopes /hs help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SET);
-}
-
MODULE_INIT("ms_set", MSSet)
diff --git a/src/core/ms_staff.c b/src/core/ms_staff.c
index 45bcc6ca0..7d4ca6665 100644
--- a/src/core/ms_staff.c
+++ b/src/core/ms_staff.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myMemoServHelp(User *u);
-
class CommandMSStaff : public Command
{
public:
@@ -79,17 +77,11 @@ class MSStaff : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(MEMOSERV, new CommandMSStaff(), MOD_UNIQUE);
- this->SetMemoHelp(myMemoServHelp);
+ }
+ void MemoServHelp(User *u)
+ {
+ notice_lang(s_MemoServ, u, MEMO_HELP_CMD_STAFF);
}
};
-/**
- * Add the help response to anopes /ms help output.
- * @param u The user who is requesting help
- **/
-void myMemoServHelp(User *u)
-{
- notice_lang(s_MemoServ, u, MEMO_HELP_CMD_STAFF);
-}
-
MODULE_INIT("ms_staff", MSStaff)
diff --git a/src/core/ns_access.c b/src/core/ns_access.c
index e66cce40e..4222a47b4 100644
--- a/src/core/ns_access.c
+++ b/src/core/ns_access.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSAccess : public Command
{
private:
@@ -183,18 +181,11 @@ class NSAccess : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSAccess(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_ACCESS);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_ACCESS);
-}
-
MODULE_INIT("ns_access", NSAccess)
diff --git a/src/core/ns_alist.c b/src/core/ns_alist.c
index 99d72668a..21cbdd99a 100644
--- a/src/core/ns_alist.c
+++ b/src/core/ns_alist.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSAList : public Command
{
public:
@@ -153,18 +151,11 @@ class NSAList : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSAList(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_ALIST);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_ALIST);
-}
-
MODULE_INIT("ns_alist", NSAList)
diff --git a/src/core/ns_drop.c b/src/core/ns_drop.c
index cbffd0f0f..b67e079ff 100644
--- a/src/core/ns_drop.c
+++ b/src/core/ns_drop.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSDrop : public Command
{
public:
@@ -120,18 +118,11 @@ class NSDrop : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSDrop(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_DROP);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_DROP);
-}
-
MODULE_INIT("ns_drop", NSDrop)
diff --git a/src/core/ns_forbid.c b/src/core/ns_forbid.c
index a1b9ed873..bf7a6298b 100644
--- a/src/core/ns_forbid.c
+++ b/src/core/ns_forbid.c
@@ -15,7 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
NickAlias *makenick(const char *nick);
class CommandNSForbid : public Command
@@ -110,20 +109,13 @@ class NSForbid : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSForbid(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_FORBID);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_FORBID);
-}
-
NickAlias *makenick(const char *nick)
{
NickAlias *na;
diff --git a/src/core/ns_getemail.c b/src/core/ns_getemail.c
index f80bb1806..6baaadcd3 100644
--- a/src/core/ns_getemail.c
+++ b/src/core/ns_getemail.c
@@ -20,8 +20,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSGetEMail : public Command
{
public:
@@ -80,18 +78,11 @@ class NSGetEMail : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSGetEMail(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_GETEMAIL);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_GETEMAIL);
-}
-
MODULE_INIT("ns_getemail", NSGetEMail)
diff --git a/src/core/ns_getpass.c b/src/core/ns_getpass.c
index bb395ab8c..04d7b1ba0 100644
--- a/src/core/ns_getpass.c
+++ b/src/core/ns_getpass.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSGetPass : public Command
{
public:
@@ -91,21 +89,14 @@ class NSGetPass : public Module
this->AddCommand(NICKSERV, new CommandNSGetPass(), MOD_UNIQUE);
- this->SetNickHelp(myNickServHelp);
-
char tmp_pass[PASSMAX];
if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1))
throw ModuleException("Incompatible with the encryption module being used");
}
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_GETPASS);
+ }
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_GETPASS);
-}
-
MODULE_INIT("ns_getpass", NSGetPass)
diff --git a/src/core/ns_ghost.c b/src/core/ns_ghost.c
index ffca53cb4..35d6f1a67 100644
--- a/src/core/ns_ghost.c
+++ b/src/core/ns_ghost.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSGhost : public Command
{
public:
@@ -98,18 +96,11 @@ class NSGhost : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSGhost(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_GHOST);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_GHOST);
-}
-
MODULE_INIT("ns_ghost", NSGhost)
diff --git a/src/core/ns_group.c b/src/core/ns_group.c
index bac000611..47b67960c 100644
--- a/src/core/ns_group.c
+++ b/src/core/ns_group.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
NickAlias *makealias(const char *nick, NickCore *nc);
class CommandNSGroup : public Command
@@ -267,21 +265,14 @@ class NSGroup : public Module
this->AddCommand(NICKSERV, new CommandNSGroup(), MOD_UNIQUE);
this->AddCommand(NICKSERV, new CommandNSGList(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_GROUP);
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_GLIST);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_GROUP);
- notice_lang(s_NickServ, u, NICK_HELP_CMD_GLIST);
-}
-
/* Creates a new alias in NickServ database. */
NickAlias *makealias(const char *nick, NickCore *nc)
{
diff --git a/src/core/ns_help.c b/src/core/ns_help.c
index 5c2b164cd..046af753f 100644
--- a/src/core/ns_help.c
+++ b/src/core/ns_help.c
@@ -43,7 +43,7 @@ class CommandNSHelp : public Command
void OnSyntaxError(User *u)
{
notice_help(s_NickServ, u, NICK_HELP);
- moduleDisplayHelp(1, u);
+ moduleDisplayHelp(s_NickServ, u);
if (u->nc && u->nc->IsServicesOper())
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP);
if (NSExpire >= 86400)
diff --git a/src/core/ns_identify.c b/src/core/ns_identify.c
index d09be6a03..457edb974 100644
--- a/src/core/ns_identify.c
+++ b/src/core/ns_identify.c
@@ -18,8 +18,6 @@
#define TO_COLLIDE 0 /* Collide the user with this nick */
#define TO_RELEASE 1 /* Release a collided nick */
-void myNickServHelp(User *u);
-
class CommandNSIdentify : public Command
{
public:
@@ -135,18 +133,11 @@ class NSIdentify : public Module
this->AddCommand(NICKSERV, new CommandNSIdentify("IDENTIFY"), MOD_UNIQUE);
this->AddCommand(NICKSERV, new CommandNSIdentify("ID"), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_IDENTIFY);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_IDENTIFY);
-}
-
MODULE_INIT("ns_identify", NSIdentify)
diff --git a/src/core/ns_info.c b/src/core/ns_info.c
index d537ff272..330743438 100644
--- a/src/core/ns_info.c
+++ b/src/core/ns_info.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSInfo : public Command
{
private:
@@ -220,18 +218,11 @@ class NSInfo : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSInfo(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_INFO);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_INFO);
-}
-
MODULE_INIT("ns_info", NSInfo)
diff --git a/src/core/ns_list.c b/src/core/ns_list.c
index 534f371e3..8248b173c 100644
--- a/src/core/ns_list.c
+++ b/src/core/ns_list.c
@@ -16,8 +16,6 @@
#include "module.h"
#include "hashcomp.h"
-void myNickServHelp(User *u);
-
class CommandNSList : public Command
{
public:
@@ -221,19 +219,12 @@ class NSList : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSList(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ if (!NSListOpersOnly || is_oper(u))
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_LIST);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- if (!NSListOpersOnly || is_oper(u))
- notice_lang(s_NickServ, u, NICK_HELP_CMD_LIST);
-}
-
MODULE_INIT("ns_list", NSList)
diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c
index a726b1f15..0d68beae3 100644
--- a/src/core/ns_logout.c
+++ b/src/core/ns_logout.c
@@ -18,8 +18,6 @@
#define TO_COLLIDE 0 /* Collide the user with this nick */
#define TO_RELEASE 1 /* Release a collided nick */
-void myNickServHelp(User *u);
-
class CommandNSLogout : public Command
{
public:
@@ -112,18 +110,11 @@ class NSLogout : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSLogout(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_LOGOUT);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_LOGOUT);
-}
-
MODULE_INIT("ns_logout", NSLogout)
diff --git a/src/core/ns_recover.c b/src/core/ns_recover.c
index 6032ca509..b843d5c30 100644
--- a/src/core/ns_recover.c
+++ b/src/core/ns_recover.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSRecover : public Command
{
public:
@@ -117,18 +115,11 @@ class NSRecover : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSRecover(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_RECOVER);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_RECOVER);
-}
-
MODULE_INIT("ns_recover", NSRecover)
diff --git a/src/core/ns_register.c b/src/core/ns_register.c
index c5a6e5120..54bb154a8 100644
--- a/src/core/ns_register.c
+++ b/src/core/ns_register.c
@@ -16,7 +16,6 @@
#include "module.h"
#include "encrypt.h"
-void myNickServHelp(User *u);
NickRequest *makerequest(const char *nick);
NickAlias *makenick(const char *nick);
int do_sendregmail(User *u, NickRequest *nr);
@@ -423,24 +422,17 @@ class NSRegister : public Module
this->AddCommand(NICKSERV, new CommandNSRegister(), MOD_UNIQUE);
this->AddCommand(NICKSERV, new CommandNSConfirm("CONFIRM", 0, 1), MOD_UNIQUE);
this->AddCommand(NICKSERV, new CommandNSResend(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
}
-};
-
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_REGISTER);
- if (NSEmailReg)
+ void NickServHelp(User *u)
{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_CONFIRM);
- notice_lang(s_NickServ, u, NICK_HELP_CMD_RESEND);
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_REGISTER);
+ if (NSEmailReg)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_CONFIRM);
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_RESEND);
+ }
}
-}
+};
/*************************************************************************/
diff --git a/src/core/ns_release.c b/src/core/ns_release.c
index 66b0fc043..3603e9976 100644
--- a/src/core/ns_release.c
+++ b/src/core/ns_release.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSRelease : public Command
{
public:
@@ -99,18 +97,11 @@ class NSRelease : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSRelease(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_RELEASE);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_RELEASE);
-}
-
MODULE_INIT("ns_release", NSRelease)
diff --git a/src/core/ns_saset.c b/src/core/ns_saset.c
index 4b2322743..80a5dd917 100644
--- a/src/core/ns_saset.c
+++ b/src/core/ns_saset.c
@@ -16,8 +16,6 @@
#include "module.h"
#include "encrypt.h"
-void myNickServHelp(User *u);
-
class CommandNSSASet : public Command
{
private:
@@ -588,18 +586,11 @@ public:
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSSASet(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_SASET);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_SASET);
-}
-
MODULE_INIT("ns_saset", NSSASet)
diff --git a/src/core/ns_sendpass.c b/src/core/ns_sendpass.c
index 6ebd3385c..b60044005 100644
--- a/src/core/ns_sendpass.c
+++ b/src/core/ns_sendpass.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSSendPass : public Command
{
public:
@@ -96,8 +94,6 @@ class NSSendPass : public Module
this->AddCommand(NICKSERV, new CommandNSSendPass(), MOD_UNIQUE);
- this->SetNickHelp(myNickServHelp);
-
if (!UseMail)
throw ModuleException("Not using mail, whut.");
@@ -105,15 +101,10 @@ class NSSendPass : public Module
if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1))
throw ModuleException("Incompatible with the encryption module being used");
}
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_SENDPASS);
+ }
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_SENDPASS);
-}
-
MODULE_INIT("ns_sendpass", NSSendPass)
diff --git a/src/core/ns_set.c b/src/core/ns_set.c
index d99c657eb..c35667f5c 100644
--- a/src/core/ns_set.c
+++ b/src/core/ns_set.c
@@ -16,8 +16,6 @@
#include "module.h"
#include "encrypt.h"
-void myNickServHelp(User *u);
-
class CommandNSSet : public Command
{
private:
@@ -544,18 +542,11 @@ class NSSet : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSSet(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_SET);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_SET);
-}
-
MODULE_INIT("ns_set", NSSet)
diff --git a/src/core/ns_status.c b/src/core/ns_status.c
index f4960095e..434840ddf 100644
--- a/src/core/ns_status.c
+++ b/src/core/ns_status.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSStatus : public Command
{
public:
@@ -73,18 +71,11 @@ class NSStatus : public Module
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSStatus(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_STATUS);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_STATUS);
-}
-
MODULE_INIT("ns_status", NSStatus)
diff --git a/src/core/ns_suspend.c b/src/core/ns_suspend.c
index 9c32e8d90..884286084 100644
--- a/src/core/ns_suspend.c
+++ b/src/core/ns_suspend.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSSuspend : public Command
{
public:
@@ -182,19 +180,12 @@ class NSSuspend : public Module
this->AddCommand(NICKSERV, new CommandNSSuspend(), MOD_UNIQUE);
this->AddCommand(NICKSERV, new CommandNSUnSuspend(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_SUSPEND);
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_UNSUSPEND);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_SUSPEND);
- notice_lang(s_NickServ, u, NICK_HELP_CMD_UNSUSPEND);
-}
-
MODULE_INIT("ns_suspend", NSSuspend)
diff --git a/src/core/ns_update.c b/src/core/ns_update.c
index 8f9d0d0c5..f8a12520a 100644
--- a/src/core/ns_update.c
+++ b/src/core/ns_update.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myNickServHelp(User *u);
-
class CommandNSUpdate : public Command
{
public:
@@ -64,18 +62,11 @@ class NSUpdate : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(NICKSERV, new CommandNSUpdate(), MOD_UNIQUE);
-
- this->SetNickHelp(myNickServHelp);
+ }
+ void NickServHelp(User *u)
+ {
+ notice_lang(s_NickServ, u, NICK_HELP_CMD_UPDATE);
}
};
-/**
- * Add the help response to anopes /ns help output.
- * @param u The user who is requesting help
- **/
-void myNickServHelp(User *u)
-{
- notice_lang(s_NickServ, u, NICK_HELP_CMD_UPDATE);
-}
-
MODULE_INIT("ns_update", NSUpdate)
diff --git a/src/core/os_admin.c b/src/core/os_admin.c
index c14a542b6..0b8cf2169 100644
--- a/src/core/os_admin.c
+++ b/src/core/os_admin.c
@@ -17,7 +17,6 @@
int admin_list_callback(SList *slist, int number, void *item, va_list args);
int admin_list(int number, NickCore *nc, User *u, int *sent_header);
-void myOperServHelp(User *u);
class CommandOSAdmin : public Command
{
@@ -250,20 +249,13 @@ class OSAdmin : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSAdmin(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_ADMIN);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_ADMIN);
-}
-
int admin_list_callback(SList *slist, int number, void *item, va_list args)
{
User *u = va_arg(args, User *);
diff --git a/src/core/os_akill.c b/src/core/os_akill.c
index e3ac8d5e8..59003ed7d 100644
--- a/src/core/os_akill.c
+++ b/src/core/os_akill.c
@@ -15,7 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
int akill_view_callback(SList *slist, int number, void *item, va_list args);
int akill_list_callback(SList *slist, int number, void *item, va_list args);
int akill_view(int number, Akill *ak, User *u, int *sent_header);
@@ -331,20 +330,13 @@ class OSAKill : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSAKill(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_AKILL);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_AKILL);
-}
-
int akill_view(int number, Akill *ak, User *u, int *sent_header)
{
char mask[BUFSIZE];
diff --git a/src/core/os_chankill.c b/src/core/os_chankill.c
index 7ab8cf637..1962c4e4f 100644
--- a/src/core/os_chankill.c
+++ b/src/core/os_chankill.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSChanKill : public Command
{
public:
@@ -112,18 +110,11 @@ class OSChanKill : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSChanKill(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_CHANKILL);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_CHANKILL);
-}
-
MODULE_INIT("os_chankill", OSChanKill)
diff --git a/src/core/os_chanlist.c b/src/core/os_chanlist.c
index 6a21a1ec3..77bc01edb 100644
--- a/src/core/os_chanlist.c
+++ b/src/core/os_chanlist.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSChanList : public Command
{
public:
@@ -89,18 +87,11 @@ class OSChanList : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSChanList(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_CHANLIST);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_CHANLIST);
-}
-
MODULE_INIT("os_chanlist", OSChanList)
diff --git a/src/core/os_clearmodes.c b/src/core/os_clearmodes.c
index 546bcaf37..249484ee4 100644
--- a/src/core/os_clearmodes.c
+++ b/src/core/os_clearmodes.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSClearModes : public Command
{
public:
@@ -255,18 +253,11 @@ class OSClearModes : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSClearModes(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_CLEARMODES);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_CLEARMODES);
-}
-
MODULE_INIT("os_clearmodes", OSClearModes)
diff --git a/src/core/os_defcon.c b/src/core/os_defcon.c
index fdd95843b..0ad450241 100644
--- a/src/core/os_defcon.c
+++ b/src/core/os_defcon.c
@@ -17,8 +17,6 @@
void defcon_sendlvls(User *u);
-void myOperServHelp(User *u);
-
class CommandOSDEFCON : public Command
{
public:
@@ -98,21 +96,14 @@ class OSDEFCON : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSDEFCON(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_DEFCON);
}
};
/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_DEFCON);
-}
-
-/**
* Send a message to the oper about which precautions are "active" for this level
**/
void defcon_sendlvls(User *u)
diff --git a/src/core/os_global.c b/src/core/os_global.c
index 4e897e186..465cc848f 100644
--- a/src/core/os_global.c
+++ b/src/core/os_global.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSGlobal : public Command
{
public:
@@ -56,17 +54,11 @@ class OSGlobal : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSGlobal(), MOD_UNIQUE);
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_GLOBAL);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_GLOBAL);
-}
-
MODULE_INIT("os_global", OSGlobal)
diff --git a/src/core/os_help.c b/src/core/os_help.c
index 94b241f4a..bc0841fa9 100644
--- a/src/core/os_help.c
+++ b/src/core/os_help.c
@@ -31,7 +31,7 @@ class CommandOSHelp : public Command
void OnSyntaxError(User *u)
{
notice_help(s_OperServ, u, OPER_HELP);
- moduleDisplayHelp(5, u);
+ moduleDisplayHelp(s_OperServ, u);
notice_help(s_OperServ, u, OPER_HELP_LOGGED);
}
};
diff --git a/src/core/os_ignore.c b/src/core/os_ignore.c
index 46e57a3d9..286f58388 100644
--- a/src/core/os_ignore.c
+++ b/src/core/os_ignore.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSIgnore : public Command
{
private:
@@ -141,18 +139,11 @@ class OSIgnore : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSIgnore(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_IGNORE);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_IGNORE);
-}
-
MODULE_INIT("os_ignore", OSIgnore)
diff --git a/src/core/os_jupe.c b/src/core/os_jupe.c
index 3dfc420cb..7b988af6f 100644
--- a/src/core/os_jupe.c
+++ b/src/core/os_jupe.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSJupe : public Command
{
public:
@@ -67,18 +65,11 @@ class OSJupe : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSJupe(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_JUPE);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_JUPE);
-}
-
MODULE_INIT("os_jupe", OSJupe)
diff --git a/src/core/os_kick.c b/src/core/os_kick.c
index 6e8d82237..06c8a5c74 100644
--- a/src/core/os_kick.c
+++ b/src/core/os_kick.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSKick : public Command
{
public:
@@ -75,18 +73,11 @@ class OSKick : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSKick(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_KICK);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_KICK);
-}
-
MODULE_INIT("os_kick", OSKick)
diff --git a/src/core/os_mode.c b/src/core/os_mode.c
index dcfc525c9..ead4f34da 100644
--- a/src/core/os_mode.c
+++ b/src/core/os_mode.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSMode : public Command
{
public:
@@ -71,18 +69,11 @@ class OSMode : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSMode(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_MODE);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_MODE);
-}
-
MODULE_INIT("os_mode", OSMode)
diff --git a/src/core/os_modinfo.c b/src/core/os_modinfo.c
index e96de987c..28ee078de 100644
--- a/src/core/os_modinfo.c
+++ b/src/core/os_modinfo.c
@@ -15,7 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
int showModuleCmdLoaded(CommandHash *cmdList, const char *mod_name, User *u);
class CommandOSModInfo : public Command
@@ -75,21 +74,13 @@ class OSModInfo : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSModInfo(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_MODINFO);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_MODINFO);
-}
-
int showModuleCmdLoaded(CommandHash *cmdList, const char *mod_name, User *u)
{
Command *c;
diff --git a/src/core/os_modlist.c b/src/core/os_modlist.c
index eec8bfdbf..cb92215f1 100644
--- a/src/core/os_modlist.c
+++ b/src/core/os_modlist.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSModList : public Command
{
public:
@@ -180,19 +178,11 @@ class OSModList : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSModList(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_MODLIST);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_MODLIST);
-}
-
MODULE_INIT("os_modlist", OSModList)
diff --git a/src/core/os_modload.c b/src/core/os_modload.c
index 2f7fcd868..bd7df70f4 100644
--- a/src/core/os_modload.c
+++ b/src/core/os_modload.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSModLoad : public Command
{
public:
@@ -67,19 +65,11 @@ class OSModLoad : public Module
this->SetPermanent(true);
this->AddCommand(OPERSERV, new CommandOSModLoad(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_MODLOAD);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_MODLOAD);
-}
-
MODULE_INIT("os_modload", OSModLoad)
diff --git a/src/core/os_modunload.c b/src/core/os_modunload.c
index 8c9bc5ade..bca85daa1 100644
--- a/src/core/os_modunload.c
+++ b/src/core/os_modunload.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSModUnLoad : public Command
{
public:
@@ -69,19 +67,11 @@ class OSModUnLoad : public Module
this->SetPermanent(true);
this->AddCommand(OPERSERV, new CommandOSModUnLoad(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_MODUNLOAD);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_MODUNLOAD);
-}
-
MODULE_INIT("os_modunload", OSModUnLoad)
diff --git a/src/core/os_news.c b/src/core/os_news.c
index 432907359..8ec596e3d 100644
--- a/src/core/os_news.c
+++ b/src/core/os_news.c
@@ -15,7 +15,6 @@
#include "module.h"
-
/* List of messages for each news type. This simplifies message sending. */
#define MSG_SYNTAX 0
@@ -32,9 +31,6 @@
#define MSG_DELETED_ALL 11
#define MSG_MAX 11
-
-void myOperServHelp(User *u);
-
struct newsmsgs {
int16 type;
const char *name;
@@ -369,8 +365,12 @@ class OSNews : public Module
this->AddCommand(OPERSERV, OSOperNews, MOD_UNIQUE);
this->AddCommand(OPERSERV, new CommandOSRandomNews(), MOD_UNIQUE);
ModuleManager::Attach(I_OnReload, this);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_LOGONNEWS);
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_OPERNEWS);
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_RANDOMNEWS);
}
void OnReload(bool starting)
@@ -380,17 +380,4 @@ class OSNews : public Module
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_LOGONNEWS);
- notice_lang(s_OperServ, u, OPER_HELP_CMD_OPERNEWS);
- notice_lang(s_OperServ, u, OPER_HELP_CMD_RANDOMNEWS);
-}
-
-
MODULE_INIT("os_news", OSNews)
diff --git a/src/core/os_noop.c b/src/core/os_noop.c
index cd0745713..707ea4b7e 100644
--- a/src/core/os_noop.c
+++ b/src/core/os_noop.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSNOOP : public Command
{
public:
@@ -83,20 +81,11 @@ class OSNOOP : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSNOOP(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_NOOP);
}
};
-
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_NOOP);
-}
-
MODULE_INIT("os_noop", OSNOOP)
diff --git a/src/core/os_oline.c b/src/core/os_oline.c
index 822461c75..f122a8c7c 100644
--- a/src/core/os_oline.c
+++ b/src/core/os_oline.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSOLine : public Command
{
public:
@@ -83,22 +81,13 @@ class OSOLine : public Module
this->AddCommand(OPERSERV, new CommandOSOLine(), MOD_UNIQUE);
- this->SetOperHelp(myOperServHelp);
-
if (!ircd->omode)
throw ModuleException("Your IRCd does not support OMODE.");
-
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_OLINE);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_OLINE);
-}
-
MODULE_INIT("os_oline", OSOLine)
diff --git a/src/core/os_oper.c b/src/core/os_oper.c
index 82dde2795..b94a3e1c6 100644
--- a/src/core/os_oper.c
+++ b/src/core/os_oper.c
@@ -17,7 +17,6 @@
int oper_list_callback(SList *slist, int number, void *item, va_list args);
int oper_list(int number, NickCore *nc, User *u, int *sent_header);
-void myOperServHelp(User *u);
class CommandOSOper : public Command
{
@@ -245,21 +244,13 @@ class OSOper : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSOper(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_OPER);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_OPER);
-}
-
/* Lists an oper entry, prefixing it with the header if needed */
int oper_list(int number, NickCore *nc, User *u, int *sent_header)
{
diff --git a/src/core/os_quit.c b/src/core/os_quit.c
index 2e13e68af..6bc354ef1 100644
--- a/src/core/os_quit.c
+++ b/src/core/os_quit.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSQuit : public Command
{
public:
@@ -63,19 +61,11 @@ class OSQuit : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSQuit(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_QUIT);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_QUIT);
-}
-
MODULE_INIT("os_quit", OSQuit)
diff --git a/src/core/os_reload.c b/src/core/os_reload.c
index 7b06b80a1..6eb9bbc68 100644
--- a/src/core/os_reload.c
+++ b/src/core/os_reload.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSReload : public Command
{
public:
@@ -58,19 +56,11 @@ class OSReload : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSReload(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_RELOAD);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_RELOAD);
-}
-
MODULE_INIT("os_reload", OSReload)
diff --git a/src/core/os_restart.c b/src/core/os_restart.c
index 013c53ed2..7afc2f20e 100644
--- a/src/core/os_restart.c
+++ b/src/core/os_restart.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSRestart : public Command
{
public:
@@ -67,18 +65,11 @@ class OSRestart : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSRestart(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_RESTART);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_RESTART);
-}
-
MODULE_INIT("os_restart", OSRestart)
diff --git a/src/core/os_session.c b/src/core/os_session.c
index 8f1eea071..d61f78fd6 100644
--- a/src/core/os_session.c
+++ b/src/core/os_session.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSSession : public Command
{
private:
@@ -464,19 +462,12 @@ class OSSession : public Module
this->AddCommand(OPERSERV, new CommandOSSession(), MOD_UNIQUE);
this->AddCommand(OPERSERV, new CommandOSException(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_SESSION);
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_EXCEPTION);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_SESSION);
- notice_lang(s_OperServ, u, OPER_HELP_CMD_EXCEPTION);
-}
-
MODULE_INIT("os_session", OSSession)
diff --git a/src/core/os_set.c b/src/core/os_set.c
index 8c666190c..46ca85037 100644
--- a/src/core/os_set.c
+++ b/src/core/os_set.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSSet : public Command
{
private:
@@ -302,18 +300,11 @@ class OSSet : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSSet(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_SET);
}
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_SET);
-}
-
MODULE_INIT("os_set", OSSet)
diff --git a/src/core/os_sgline.c b/src/core/os_sgline.c
index 958e2547a..02bad147a 100644
--- a/src/core/os_sgline.c
+++ b/src/core/os_sgline.c
@@ -16,7 +16,6 @@
#include "module.h"
#include "hashcomp.h"
-void myOperServHelp(User *u);
int sgline_view_callback(SList *slist, int number, void *item, va_list args);
int sgline_list_callback(SList *slist, int number, void *item, va_list args);
int sgline_view(int number, SXLine *sx, User *u, int *sent_header);
@@ -331,22 +330,15 @@ class OSSGLine : public Module
this->AddCommand(OPERSERV, new CommandOSSGLine(), MOD_UNIQUE);
- this->SetOperHelp(myOperServHelp);
-
if (!ircd->sgline)
throw ModuleException("Your IRCd does not support SGLine");
}
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_SGLINE);
+ }
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_SGLINE);
-}
-
/* Lists an SGLINE entry, prefixing it with the header if needed */
int sgline_view(int number, SXLine *sx, User *u, int *sent_header)
{
diff --git a/src/core/os_shutdown.c b/src/core/os_shutdown.c
index 96b157f82..d45163011 100644
--- a/src/core/os_shutdown.c
+++ b/src/core/os_shutdown.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSShutdown : public Command
{
public:
@@ -64,19 +62,11 @@ class OSShutdown : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSShutdown(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_SHUTDOWN);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_SHUTDOWN);
-}
-
MODULE_INIT("os_shutdown", OSShutdown)
diff --git a/src/core/os_sqline.c b/src/core/os_sqline.c
index e5b054ac8..5072b62f9 100644
--- a/src/core/os_sqline.c
+++ b/src/core/os_sqline.c
@@ -15,7 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
int sqline_view_callback(SList *slist, int number, void *item, va_list args);
int sqline_list_callback(SList *slist, int number, void *item, va_list args);
int sqline_view(int number, SXLine *sx, User *u, int *sent_header);
@@ -317,22 +316,15 @@ class OSSQLine : public Module
this->AddCommand(OPERSERV, new CommandOSSQLine(), MOD_UNIQUE);
- this->SetOperHelp(myOperServHelp);
if (!ircd->sqline)
throw ModuleException("Your IRCd does not support QLines.");
}
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_SQLINE);
+ }
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_SQLINE);
-}
-
int sqline_view(int number, SXLine *sx, User *u, int *sent_header)
{
char timebuf[32], expirebuf[256];
diff --git a/src/core/os_staff.c b/src/core/os_staff.c
index 365db9da7..f49427e12 100644
--- a/src/core/os_staff.c
+++ b/src/core/os_staff.c
@@ -15,7 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
int opers_list_callback(SList *slist, int number, void *item, va_list args);
int opers_list(int number, NickCore *nc, User *u, char *level);
@@ -85,21 +84,13 @@ class OSStaff : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSStaff(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_STAFF);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_STAFF);
-}
-
/**
* Function for the enumerator to call
**/
diff --git a/src/core/os_stats.c b/src/core/os_stats.c
index aa9ee92ff..4223f1301 100644
--- a/src/core/os_stats.c
+++ b/src/core/os_stats.c
@@ -16,7 +16,6 @@
#include "module.h"
void get_operserv_stats(long *nrec, long *memuse);
-void myOperServHelp(User *u);
/**
* Count servers connected to server s
@@ -323,21 +322,13 @@ class OSStats : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSStats(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_STATS);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_STATS);
-}
-
void get_operserv_stats(long *nrec, long *memuse)
{
int i;
diff --git a/src/core/os_svsnick.c b/src/core/os_svsnick.c
index 1c6cc4f4d..168c8c0f6 100644
--- a/src/core/os_svsnick.c
+++ b/src/core/os_svsnick.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSSVSNick : public Command
{
public:
@@ -101,20 +99,13 @@ class OSSVSNick : public Module
this->AddCommand(OPERSERV, new CommandOSSVSNick(), MOD_UNIQUE);
- this->SetOperHelp(myOperServHelp);
if (!ircd->svsnick)
throw ModuleException("Your IRCd does not support SVSNICK");
}
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_SVSNICK);
+ }
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_SVSNICK);
-}
-
MODULE_INIT("os_svsnick", OSSVSNick)
diff --git a/src/core/os_szline.c b/src/core/os_szline.c
index 95a5b97c9..2caa4cd49 100644
--- a/src/core/os_szline.c
+++ b/src/core/os_szline.c
@@ -15,7 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
int szline_view_callback(SList *slist, int number, void *item, va_list args);
int szline_list_callback(SList *slist, int number, void *item, va_list args);
int szline_view(int number, SXLine *sx, User *u, int *sent_header);
@@ -316,22 +315,15 @@ class OSSZLine : public Module
this->AddCommand(OPERSERV, new CommandOSSZLine(), MOD_UNIQUE);
- this->SetOperHelp(myOperServHelp);
if (!ircd->szline)
throw ModuleException("Your IRCd does not support ZLINEs");
}
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_SZLINE);
+ }
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_SZLINE);
-}
-
int szline_view(int number, SXLine *sx, User *u, int *sent_header)
{
char timebuf[32], expirebuf[256];
diff --git a/src/core/os_umode.c b/src/core/os_umode.c
index f21bb33de..34d7062ea 100644
--- a/src/core/os_umode.c
+++ b/src/core/os_umode.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSUMode : public Command
{
public:
@@ -87,20 +85,13 @@ class OSUMode : public Module
this->AddCommand(OPERSERV, new CommandOSUMode(), MOD_UNIQUE);
- this->SetOperHelp(myOperServHelp);
-
if (!ircd->umode)
throw ModuleException("Your IRCd does not support setting umodes");
}
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_UMODE);
+ }
};
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_UMODE);
-}
-
MODULE_INIT("os_umode", OSUMode)
diff --git a/src/core/os_update.c b/src/core/os_update.c
index 865a41203..0ce0b761b 100644
--- a/src/core/os_update.c
+++ b/src/core/os_update.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSUpdate : public Command
{
public:
@@ -48,19 +46,11 @@ class OSUpdate : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSUpdate(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_UPDATE);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_UPDATE);
-}
-
MODULE_INIT("os_update", OSUpdate)
diff --git a/src/core/os_userlist.c b/src/core/os_userlist.c
index a91171ee8..38325484f 100644
--- a/src/core/os_userlist.c
+++ b/src/core/os_userlist.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myOperServHelp(User *u);
-
class CommandOSUserList : public Command
{
public:
@@ -94,19 +92,11 @@ class OSUserList : public Module
this->SetType(CORE);
this->AddCommand(OPERSERV, new CommandOSUserList(), MOD_UNIQUE);
-
- this->SetOperHelp(myOperServHelp);
+ }
+ void OperServHelp(User *u)
+ {
+ notice_lang(s_OperServ, u, OPER_HELP_CMD_USERLIST);
}
};
-
-/**
- * Add the help response to anopes /os help output.
- * @param u The user who is requesting help
- **/
-void myOperServHelp(User *u)
-{
- notice_lang(s_OperServ, u, OPER_HELP_CMD_USERLIST);
-}
-
MODULE_INIT("os_userlist", OSUserList)
diff --git a/src/module.cpp b/src/module.cpp
index f5cc178d2..41dfab0b0 100644
--- a/src/module.cpp
+++ b/src/module.cpp
@@ -15,12 +15,6 @@
Module::Module(const std::string &mname, const std::string &creator)
{
this->name = mname; /* Our name */
- this->nickHelp = NULL;
- this->chanHelp = NULL;
- this->memoHelp = NULL;
- this->botHelp = NULL;
- this->operHelp = NULL;
- this->hostHelp = NULL;
this->type = THIRD;
this->handle = NULL;
diff --git a/src/modules.c b/src/modules.c
index 3a850ee6a..da7d6a9ed 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -785,61 +785,33 @@ void moduleCallBackPrepForUnload(const char *mod_name)
}
}
-void Module::SetNickHelp(void (*func)(User *))
-{
- this->nickHelp = func;
-}
-
-void Module::SetChanHelp(void (*func)(User *))
-{
- this->chanHelp = func;
-}
-
-void Module::SetMemoHelp(void (*func)(User *))
-{
- this->memoHelp = func;
-}
-
-void Module::SetBotHelp(void (*func)(User *))
-{
- this->botHelp = func;
-}
-
-void Module::SetOperHelp(void (*func)(User *))
-{
- this->operHelp = func;
-}
-
-void Module::SetHostHelp(void (*func)(User *))
-{
- this->hostHelp = func;
-}
-
/**
* Display any extra module help for the given service.
* @param services which services is help being dispalyed for?
* @param u which user is requesting the help
**/
-void moduleDisplayHelp(int service, User * u)
+void moduleDisplayHelp(const char *service, User * u)
{
int idx;
ModuleHash *current = NULL;
+ if (!service)
+ return;
+
for (idx = 0; idx != MAX_CMD_HASH; idx++) {
for (current = MODULE_HASH[idx]; current; current = current->next) {
- if ((service == 1) && current->m->nickHelp) {
- current->m->nickHelp(u);
- } else if ((service == 2) && current->m->chanHelp) {
- current->m->chanHelp(u);
- } else if ((service == 3) && current->m->memoHelp) {
- current->m->memoHelp(u);
- } else if ((service == 4) && current->m->botHelp) {
- current->m->botHelp(u);
- } else if ((service == 5) && current->m->operHelp) {
- current->m->operHelp(u);
- } else if ((service == 6) && current->m->hostHelp) {
- current->m->hostHelp(u);
- }
+ if (!strcmp(s_NickServ, service))
+ current->m->NickServHelp(u);
+ else if (!strcmp(s_ChanServ, service))
+ current->m->ChanServHelp(u);
+ else if (!strcmp(s_MemoServ, service))
+ current->m->MemoServHelp(u);
+ else if (!strcmp(s_BotServ, service))
+ current->m->BotServHelp(u);
+ else if (!strcmp(s_OperServ, service))
+ current->m->OperServHelp(u);
+ else if (!strcmp(s_HostServ, service))
+ current->m->HostServHelp(u);
}
}
}
diff --git a/src/modules/cs_appendtopic.c b/src/modules/cs_appendtopic.c
index 5475cb17e..5a852465f 100644
--- a/src/modules/cs_appendtopic.c
+++ b/src/modules/cs_appendtopic.c
@@ -48,8 +48,6 @@
#define LNG_CHAN_HELP_APPENDTOPIC 1
#define LNG_APPENDTOPIC_SYNTAX 2
-void my_cs_help(User *u);
-
static Module *me;
class CommandCSAppendTopic : public Command
@@ -145,7 +143,6 @@ class CSAppendTopic : public Module
this->SetType(SUPPORTED);
this->AddCommand(CHANSERV, new CommandCSAppendTopic(), MOD_HEAD);
- this->SetChanHelp(my_cs_help);
/* English (US) */
const char* langtable_en_us[] = {
@@ -227,11 +224,10 @@ class CSAppendTopic : public Module
this->InsertLanguage(LANG_RU, LNG_NUM_STRINGS, langtable_ru);
this->InsertLanguage(LANG_IT, LNG_NUM_STRINGS, langtable_it);
}
+ void ChanServHelp(User *u)
+ {
+ this->NoticeLang(s_ChanServ, u, LNG_CHAN_HELP);
+ }
};
-void my_cs_help(User *u)
-{
- me->NoticeLang(s_ChanServ, u, LNG_CHAN_HELP);
-}
-
MODULE_INIT("cs_appendtopic", CSAppendTopic)
diff --git a/src/modules/cs_enforce.c b/src/modules/cs_enforce.c
index ab90164e0..ae2af3453 100644
--- a/src/modules/cs_enforce.c
+++ b/src/modules/cs_enforce.c
@@ -18,8 +18,6 @@
#define AUTHOR "Anope"
#define VERSION "$Id$"
-void my_cs_help(User *u);
-
#define LNG_NUM_STRINGS 6
#define LNG_CHAN_HELP 0
@@ -262,8 +260,6 @@ class CSEnforce : public Module
this->AddCommand(CHANSERV, new CommandCSEnforce(), MOD_HEAD);
- this->SetChanHelp(my_cs_help);
-
/* English (US) */
const char* langtable_en_us[] = {
/* LNG_CHAN_HELP */
@@ -472,12 +468,10 @@ class CSEnforce : public Module
this->InsertLanguage(LANG_RU, LNG_NUM_STRINGS, langtable_ru);
this->InsertLanguage(LANG_IT, LNG_NUM_STRINGS, langtable_it);
}
+ void ChanServHelp(User *u)
+ {
+ this->NoticeLang(s_ChanServ, u, LNG_CHAN_HELP);
+ }
};
-/* Language and response stuff */
-void my_cs_help(User *u)
-{
- me->NoticeLang(s_ChanServ, u, LNG_CHAN_HELP);
-}
-
MODULE_INIT("cs_enforce", CSEnforce)
diff --git a/src/modules/cs_tban.c b/src/modules/cs_tban.c
index 0e86007d5..358a4718c 100644
--- a/src/modules/cs_tban.c
+++ b/src/modules/cs_tban.c
@@ -21,7 +21,6 @@
#define AUTHOR "Rob"
#define VERSION "$Id$"
-void myHelp(User *u);
void mySendResponse(User *u, const char *channel, char *mask, const char *time);
void addBan(Channel *c, time_t timeout, char *banmask);
@@ -94,7 +93,6 @@ class CSTBan : public Module
{
me = this;
- this->SetChanHelp(myHelp);
this->AddCommand(CHANSERV, new CommandCSTBan(), MOD_HEAD);
this->SetAuthor(AUTHOR);
@@ -158,13 +156,12 @@ class CSTBan : public Module
this->InsertLanguage(LANG_RU, LANG_NUM_STRINGS, langtable_ru);
this->InsertLanguage(LANG_IT, LANG_NUM_STRINGS, langtable_it);
}
+ void ChanServHelp(User *u)
+ {
+ this->NoticeLang(s_ChanServ, u, TBAN_HELP);
+ }
};
-void myHelp(User *u)
-{
- me->NoticeLang(s_ChanServ, u, TBAN_HELP);
-}
-
void mySendResponse(User *u, const char *channel, char *mask, const char *time)
{
me->NoticeLang(s_ChanServ, u, TBAN_RESPONSE, mask, channel, time);
diff --git a/src/modules/hs_request.c b/src/modules/hs_request.c
index 6902ef129..919f42b2d 100644
--- a/src/modules/hs_request.c
+++ b/src/modules/hs_request.c
@@ -53,8 +53,6 @@ char *HSRequestDBName = NULL;
#define LNG_WAITING_SYNTAX 19
#define LNG_HELP_WAITING 20
-void hs_help(User *u);
-
void my_add_host_request(char *nick, char *vIdent, char *vhost, char *creator, int32 tmp_time);
int my_isvalidchar(const char c);
void my_memo_lang(User *u, char *name, int z, int number, ...);
@@ -416,7 +414,6 @@ class HSRequest : public Module
ModuleManager::Attach(I_OnSaveDatabase, this);
ModuleManager::Attach(I_OnBackupDatabase, this);
- this->SetHostHelp(hs_help);
this->SetAuthor(AUTHOR);
this->SetVersion(VERSION);
this->SetType(SUPPORTED);
@@ -767,6 +764,12 @@ class HSRequest : public Module
else
ModuleDatabaseBackup(HSREQ_DEFAULT_DBNAME);
}
+
+ void HostServHelp(User *u)
+ {
+ this->NoticeLang(s_HostServ, u, LNG_HELP);
+ this->NoticeLang(s_HostServ, u, LNG_HELP_SETTER);
+ }
};
void my_memo_lang(User *u, char *name, int z, int number, ...)
@@ -871,12 +874,6 @@ int my_isvalidchar(const char c)
return 0;
}
-void hs_help(User * u)
-{
- me->NoticeLang(s_HostServ, u, LNG_HELP);
- me->NoticeLang(s_HostServ, u, LNG_HELP_SETTER);
-}
-
void hsreq_load_db()
{
FILE *fp;
diff --git a/src/modules/ns_noop_convert.c b/src/modules/ns_noop_convert.c
index 287c08be3..2ff03548c 100644
--- a/src/modules/ns_noop_convert.c
+++ b/src/modules/ns_noop_convert.c
@@ -43,9 +43,6 @@ int m_isIRCop = 0;
char *NSAutoOPDBName;
-int myNickServAutoOpHelp(User * u);
-void myNickServHelp(User * u);
-
int noop(User * u);
int mEventJoin(int argc, char **argv);
int setAutoOp(User * u);
diff --git a/src/modules/os_info.c b/src/modules/os_info.c
index 74f5ab34d..e1234156a 100644
--- a/src/modules/os_info.c
+++ b/src/modules/os_info.c
@@ -42,9 +42,6 @@
char *OSInfoDBName = NULL;
-void mMainChanHelp(User *u);
-void mMainNickHelp(User *u);
-
int mLoadData();
int mLoadConfig();
@@ -252,9 +249,6 @@ class OSInfo : public Module
ModuleManager::Attach(I_OnSaveDatabase, this);
ModuleManager::Attach(I_OnBackupDatabase, this);
- this->SetNickHelp(mMainNickHelp);
- this->SetChanHelp(mMainChanHelp);
-
mLoadData();
ModuleManager::Attach(I_OnReload, this);
@@ -589,6 +583,17 @@ class OSInfo : public Module
ModuleDatabaseBackup(OSInfoDBName);
}
+ void NickServHelp(User *u)
+ {
+ if (is_oper(u))
+ this->NoticeLang(s_NickServ, u, OINFO_HELP_CMD);
+ }
+
+ void ChanServHelp(User *u)
+ {
+ if (is_oper(u))
+ this->NoticeLang(s_ChanServ, u, OCINFO_HELP_CMD);
+ }
};
/*************************************************************************/
@@ -676,20 +681,4 @@ int mLoadConfig()
/*************************************************************************/
-/* This help will be added to the main NickServ list */
-void mMainNickHelp(User *u)
-{
- if (is_oper(u))
- me->NoticeLang(s_NickServ, u, OINFO_HELP_CMD);
-}
-
-/* This help will be added to the main ChanServ list */
-void mMainChanHelp(User *u)
-{
- if (is_oper(u))
- me->NoticeLang(s_ChanServ, u, OCINFO_HELP_CMD);
-}
-
-/*************************************************************************/
-
MODULE_INIT("os_info", OSInfo)