mirror of
https://github.com/anope/anope.git
synced 2026-07-07 16:03:15 +02:00
Fixed some permission checking fail in modules that got messed up from the big commands sed
This commit is contained in:
@@ -55,7 +55,7 @@ class CommandBSAssign : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
if (bi->HasFlag(BI_PRIVATE) && !u->HasCommand("botserv/botserv/assign/private"))
|
||||
if (bi->HasFlag(BI_PRIVATE) && !u->HasCommand("botserv/assign/private"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
|
||||
@@ -40,7 +40,7 @@ class CommandBSBotList : public Command
|
||||
}
|
||||
}
|
||||
|
||||
if (u->HasCommand("botserv/botserv/botlist") && count < BotListByNick.size())
|
||||
if (u->HasCommand("botserv/botlist") && count < BotListByNick.size())
|
||||
{
|
||||
source.Reply(_("Bots reserved to IRC operators:"));
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ class CommandBSSet : public Command
|
||||
else
|
||||
this->OnSyntaxError(source, "GREET");
|
||||
}
|
||||
else if (u->HasCommand("botserv/botserv/set/nobot") && option.equals_ci("NOBOT"))
|
||||
else if (u->HasCommand("botserv/set/nobot") && option.equals_ci("NOBOT"))
|
||||
{
|
||||
if (value.equals_ci("ON"))
|
||||
{
|
||||
|
||||
@@ -43,13 +43,13 @@ class CommandCSDrop : public Command
|
||||
|
||||
ci = cs_findchan(chan);
|
||||
|
||||
if (ci->HasFlag(CI_SUSPENDED) && !u->HasCommand("chanserv/chanserv/drop"))
|
||||
if (ci->HasFlag(CI_SUSPENDED) && !u->HasCommand("chanserv/drop"))
|
||||
{
|
||||
source.Reply(CHAN_X_SUSPENDED, chan.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if ((ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !ci->AccessFor(u).HasPriv(CA_FOUNDER)) && !u->HasCommand("chanserv/chanserv/drop"))
|
||||
if ((ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !ci->AccessFor(u).HasPriv(CA_FOUNDER)) && !u->HasCommand("chanserv/drop"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
|
||||
@@ -35,7 +35,7 @@ class CommandCSGetKey : public Command
|
||||
}
|
||||
|
||||
|
||||
if (!ci->AccessFor(u).HasPriv(CA_GETKEY) && !u->HasCommand("chanserv/chanserv/getkey"))
|
||||
if (!ci->AccessFor(u).HasPriv(CA_GETKEY) && !u->HasCommand("chanserv/getkey"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
|
||||
@@ -29,7 +29,7 @@ class CommandCSList : public Command
|
||||
|
||||
Anope::string pattern = params[0];
|
||||
unsigned nchans;
|
||||
bool is_servadmin = u->HasCommand("chanserv/chanserv/list");
|
||||
bool is_servadmin = u->HasCommand("chanserv/list");
|
||||
int count = 0, from = 0, to = 0;
|
||||
bool suspended = false, channoexpire = false;
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ class CommandCSMode : public Command
|
||||
|
||||
if (!ci || !ci->c)
|
||||
source.Reply(CHAN_X_NOT_IN_USE, ci->name.c_str());
|
||||
else if (!ci->AccessFor(u).HasPriv(CA_MODE) && !u->HasCommand("chanserv/chanserv/mode"))
|
||||
else if (!ci->AccessFor(u).HasPriv(CA_MODE) && !u->HasCommand("chanserv/mode"))
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else if (subcommand.equals_ci("LOCK"))
|
||||
this->DoLock(source, ci, params);
|
||||
|
||||
@@ -37,7 +37,7 @@ class CommandCSTopic : public Command
|
||||
|
||||
if (!ci->c)
|
||||
source.Reply(CHAN_X_NOT_IN_USE, ci->name.c_str());
|
||||
else if (!ci->AccessFor(u).HasPriv(CA_TOPIC) && !u->HasCommand("chanserv/chanserv/topic"))
|
||||
else if (!ci->AccessFor(u).HasPriv(CA_TOPIC) && !u->HasCommand("chanserv/topic"))
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ class CommandNSResetPass : public Command
|
||||
User *u = source.u;
|
||||
NickAlias *na;
|
||||
|
||||
if (Config->RestrictMail && (!u->Account() || !u->HasCommand("nickserv/nickserv/resetpass")))
|
||||
if (Config->RestrictMail && (!u->Account() || !u->HasCommand("nickserv/resetpass")))
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else if (!(na = findnick(params[0])))
|
||||
source.Reply(NICK_X_NOT_REGISTERED, params[0].c_str());
|
||||
|
||||
Reference in New Issue
Block a user