summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/modules.h3
-rw-r--r--modules/commands/cs_akick.cpp2
-rw-r--r--modules/commands/help.cpp5
-rw-r--r--modules/pseudoclients/botserv.cpp5
-rw-r--r--modules/pseudoclients/chanserv.cpp5
-rw-r--r--modules/pseudoclients/global.cpp5
-rw-r--r--modules/pseudoclients/hostserv.cpp5
-rw-r--r--modules/pseudoclients/memoserv.cpp5
-rw-r--r--modules/pseudoclients/nickserv.cpp5
-rw-r--r--modules/pseudoclients/operserv.cpp5
10 files changed, 28 insertions, 17 deletions
diff --git a/include/modules.h b/include/modules.h
index 5d2e7247f..d35c1f2ba 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -317,8 +317,9 @@ class CoreExport Module : public Extensible
/** Called when someone uses the generic/help command
* @param source Command source
* @param params Params
+ * @return EVENT_STOP to stop processing
*/
- virtual void OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params) { }
+ virtual EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params) { return EVENT_CONTINUE; }
/** Called when someone uses the generic/help command
* @param source Command source
diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp
index 86c245059..f4325ea3a 100644
--- a/modules/commands/cs_akick.cpp
+++ b/modules/commands/cs_akick.cpp
@@ -461,7 +461,7 @@ class CommandCSAKick : public Command
this->SetSyntax(_("\037channel\037 ADD {\037nick\037 | \037mask\037} [\037reason\037]"));
this->SetSyntax(_("\037channel\037 DEL {\037nick\037 | \037mask\037 | \037entry-num\037 | \037list\037}"));
this->SetSyntax(_("\037channel\037 LIST [\037mask\037 | \037entry-num\037 | \037list\037]"));
- this->SetSyntax(_("\002AKICK \037channel\037 VIEW [\037mask\037 | \037entry-num\037 | \037list\037]"));
+ this->SetSyntax(_("\037channel\037 VIEW [\037mask\037 | \037entry-num\037 | \037list\037]"));
this->SetSyntax(_("\037channel\037 ENFORCE"));
this->SetSyntax(_("\037channel\037 CLEAR"));
}
diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp
index bde3b5762..f09764fa1 100644
--- a/modules/commands/help.cpp
+++ b/modules/commands/help.cpp
@@ -25,7 +25,10 @@ class CommandHelp : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- FOREACH_MOD(I_OnPreHelp, OnPreHelp(source, params));
+ EventReturn MOD_RESULT;
+ FOREACH_RESULT(I_OnPreHelp, OnPreHelp(source, params));
+ if (MOD_RESULT == EVENT_STOP)
+ return;
User *u = source.u;
BotInfo *bi = source.owner;
diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp
index 8e9fbb7cf..0055e968f 100644
--- a/modules/pseudoclients/botserv.cpp
+++ b/modules/pseudoclients/botserv.cpp
@@ -169,10 +169,10 @@ class BotServCore : public Module
}
}
- void OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
+ EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
{
if (!params.empty() || source.owner->nick != Config->BotServ)
- return;
+ return EVENT_CONTINUE;
source.Reply(_("\002%s\002 allows you to have a bot on your own channel.\n"
"It has been created for users that can't host or\n"
"configure a bot, or for use on networks that don't\n"
@@ -182,6 +182,7 @@ class BotServCore : public Module
"\002%s%s %s \037command\037\002.\n "),
Config->BotServ.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->BotServ.c_str(),
Config->UseStrictPrivMsgString.c_str(), Config->BotServ.c_str(), source.command.c_str());
+ return EVENT_CONTINUE;
}
void OnPostHelp(CommandSource &source, const std::vector<Anope::string> &params)
diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp
index 5c490e4ff..955c27256 100644
--- a/modules/pseudoclients/chanserv.cpp
+++ b/modules/pseudoclients/chanserv.cpp
@@ -108,10 +108,10 @@ class ChanServCore : public Module
}
}
- void OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
+ EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
{
if (!params.empty() || source.owner->nick != Config->ChanServ)
- return;
+ return EVENT_CONTINUE;
source.Reply(_("\002%s\002 allows you to register and control various\n"
"aspects of channels. %s can often prevent\n"
"malicious users from \"taking over\" channels by limiting\n"
@@ -120,6 +120,7 @@ class ChanServCore : public Module
"\002%s%s \037command\037\002. For more information on a\n"
"specific command, type \002%s%s HELP \037command\037\002.\n "),
Config->ChanServ.c_str(), Config->ChanServ.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->ChanServ.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->ChanServ.c_str(), Config->ChanServ.c_str(), source.command.c_str());
+ return EVENT_CONTINUE;
}
void OnPostHelp(CommandSource &source, const std::vector<Anope::string> &params)
diff --git a/modules/pseudoclients/global.cpp b/modules/pseudoclients/global.cpp
index 7bc002fc0..b43851735 100644
--- a/modules/pseudoclients/global.cpp
+++ b/modules/pseudoclients/global.cpp
@@ -79,11 +79,12 @@ class GlobalCore : public Module
notice_server(Config->Global, s, "%s", Config->GlobalOnCycleUP.c_str());
}
- void OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
+ EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
{
if (!params.empty() || source.owner->nick != Config->Global)
- return;
+ return EVENT_CONTINUE;
source.Reply(_("%s commands:\n"), Config->Global.c_str());
+ return EVENT_CONTINUE;
}
};
diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp
index a6cc6bbb7..bb67ab241 100644
--- a/modules/pseudoclients/hostserv.cpp
+++ b/modules/pseudoclients/hostserv.cpp
@@ -73,11 +73,12 @@ class HostServCore : public Module
this->OnNickIdentify(u);
}
- void OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
+ EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
{
if (!params.empty() || source.owner->nick != Config->HostServ)
- return;
+ return EVENT_CONTINUE;
source.Reply(_("%s commands:\n"), Config->HostServ.c_str());
+ return EVENT_CONTINUE;
}
};
diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp
index ca131b0de..c1f99bc41 100644
--- a/modules/pseudoclients/memoserv.cpp
+++ b/modules/pseudoclients/memoserv.cpp
@@ -201,16 +201,17 @@ class MemoServCore : public Module
this->mymemoserv.Check(u);
}
- void OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
+ EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
{
if (!params.empty() || source.owner->nick != Config->MemoServ)
- return;
+ return EVENT_CONTINUE;
source.Reply(_("\002%s\002 is a utility allowing IRC users to send short\n"
"messages to other IRC users, whether they are online at\n"
"the time or not, or to channels(*). Both the sender's\n"
"nickname and the target nickname or channel must be\n"
"registered in order to send a memo.\n"
"%s's commands include:"), Config->MemoServ.c_str(), Config->MemoServ.c_str());
+ return EVENT_CONTINUE;
}
void OnPostHelp(CommandSource &source, const std::vector<Anope::string> &params)
diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp
index 428f2a67d..4e6678250 100644
--- a/modules/pseudoclients/nickserv.cpp
+++ b/modules/pseudoclients/nickserv.cpp
@@ -267,16 +267,17 @@ class NickServCore : public Module
u->RemoveMode(NickServ, Name);
}
- void OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
+ EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
{
if (!params.empty() || source.owner->nick != Config->NickServ)
- return;
+ return EVENT_CONTINUE;
source.Reply(_("\002%s\002 allows you to \"register\" a nickname and\n"
"prevent others from using it. The following\n"
"commands allow for registration and maintenance of\n"
"nicknames; to use them, type \002%s%s \037command\037\002.\n"
"For more information on a specific command, type\n"
"\002%s%s %s \037command\037\002.\n "), Config->NickServ.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->NickServ.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->NickServ.c_str(), source.command.c_str());
+ return EVENT_CONTINUE;
}
void OnPostHelp(CommandSource &source, const std::vector<Anope::string> &params)
diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp
index 2cf4d2a28..c30809e49 100644
--- a/modules/pseudoclients/operserv.cpp
+++ b/modules/pseudoclients/operserv.cpp
@@ -327,11 +327,12 @@ class OperServCore : public Module
return EVENT_CONTINUE;
}
- void OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
+ EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params)
{
if (!params.empty() || source.owner->nick != Config->OperServ)
- return;
+ return EVENT_CONTINUE;
source.Reply(_("%s commands:"), Config->OperServ.c_str());
+ return EVENT_CONTINUE;
}
};