From 84d789c72b97513ec02a4e115b90cc952fadea64 Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Sun, 15 Feb 2009 01:59:21 +0000 Subject: Replaced notice_lang with notice_help in all OnHelp() functions in modules. Also fixed a few smaller issues regarding the help in the modules. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2053 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/ns_saset.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) (limited to 'src/core/ns_saset.c') diff --git a/src/core/ns_saset.c b/src/core/ns_saset.c index 24860bb6f..0e2a3a3ec 100644 --- a/src/core/ns_saset.c +++ b/src/core/ns_saset.c @@ -541,25 +541,39 @@ public: bool OnHelp(User *u, const std::string &subcommand) { - // This needs to change XXX if (!is_services_oper(u)) return false; - notice_lang(s_NickServ, u, NICK_HELP_SASET); - notice_lang(s_NickServ, u, NICK_HELP_SASET_DISPLAY); - notice_lang(s_NickServ, u, NICK_HELP_SASET_PASSWORD); - notice_lang(s_NickServ, u, NICK_HELP_SASET_URL); - notice_lang(s_NickServ, u, NICK_HELP_SASET_EMAIL); - notice_lang(s_NickServ, u, NICK_HELP_SASET_ICQ); - notice_lang(s_NickServ, u, NICK_HELP_SASET_GREET); - notice_lang(s_NickServ, u, NICK_HELP_SASET_KILL); - notice_lang(s_NickServ, u, NICK_HELP_SASET_SECURE); - notice_lang(s_NickServ, u, NICK_HELP_SASET_PRIVATE); - notice_lang(s_NickServ, u, NICK_HELP_SASET_MSG); - notice_lang(s_NickServ, u, NICK_HELP_SASET_HIDE); - notice_lang(s_NickServ, u, NICK_HELP_SASET_NOEXPIRE); - notice_lang(s_NickServ, u, NICK_HELP_SASET_AUTOOP); - notice_lang(s_NickServ, u, NICK_HELP_SASET_LANGUAGE); + if (subcommand.empty()) + notice_help(s_NickServ, u, NICK_HELP_SASET); + else if (subcommand == "DISPLAY") + notice_help(s_NickServ, u, NICK_HELP_SASET_DISPLAY); + else if (subcommand == "PASSWORD") + notice_help(s_NickServ, u, NICK_HELP_SASET_PASSWORD); + else if (subcommand == "URL") + notice_help(s_NickServ, u, NICK_HELP_SASET_URL); + else if (subcommand == "EMAIL") + notice_help(s_NickServ, u, NICK_HELP_SASET_EMAIL); + else if (subcommand == "ICQ") + notice_help(s_NickServ, u, NICK_HELP_SASET_ICQ); + else if (subcommand == "GREET") + notice_help(s_NickServ, u, NICK_HELP_SASET_GREET); + else if (subcommand == "KILL") + notice_help(s_NickServ, u, NICK_HELP_SASET_KILL); + else if (subcommand == "SECURE") + notice_help(s_NickServ, u, NICK_HELP_SASET_SECURE); + else if (subcommand == "PRIVATE") + notice_help(s_NickServ, u, NICK_HELP_SASET_PRIVATE); + else if (subcommand == "MSG") + notice_help(s_NickServ, u, NICK_HELP_SASET_MSG); + else if (subcommand == "HIDE") + notice_help(s_NickServ, u, NICK_HELP_SASET_HIDE); + else if (subcommand == "NOEXPIRE") + notice_help(s_NickServ, u, NICK_HELP_SASET_NOEXPIRE); + else if (subcommand == "AUTOOP") + notice_help(s_NickServ, u, NICK_HELP_SASET_AUTOOP); + else if (subcommand == "LANGUAGE") + notice_help(s_NickServ, u, NICK_HELP_SASET_LANGUAGE); return true; } -- cgit