1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 14:23:13 +02:00

Readonlyize many commands

This commit is contained in:
Adam
2013-09-20 21:07:50 -04:00
parent 8641b995c4
commit e5ece18ee7
33 changed files with 334 additions and 50 deletions
+16
View File
@@ -82,6 +82,12 @@ class CommandHSRequest : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
if (Anope::ReadOnly)
{
source.Reply(READ_ONLY_MODE);
return;
}
User *u = source.GetUser();
NickAlias *na = NickAlias::Find(source.GetNick());
if (!na || na->nc != source.GetAccount())
@@ -183,6 +189,11 @@ class CommandHSActivate : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
if (Anope::ReadOnly)
{
source.Reply(READ_ONLY_MODE);
return;
}
const Anope::string &nick = params[0];
@@ -227,6 +238,11 @@ class CommandHSReject : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
if (Anope::ReadOnly)
{
source.Reply(READ_ONLY_MODE);
return;
}
const Anope::string &nick = params[0];
const Anope::string &reason = params.size() > 1 ? params[1] : "";