mirror of
https://github.com/anope/anope.git
synced 2026-07-02 02:06:38 +02:00
Allow userless command sources
This commit is contained in:
@@ -24,7 +24,6 @@ class CommandCSSetSecureOps : public Command
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = cs_findchan(params[0]);
|
||||
if (ci == NULL)
|
||||
{
|
||||
@@ -32,7 +31,7 @@ class CommandCSSetSecureOps : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
if (source.permission.empty() && !ci->AccessFor(u).HasPriv("SET"))
|
||||
if (source.permission.empty() && !source.AccessFor(ci).HasPriv("SET"))
|
||||
{
|
||||
source.Reply(ACCESS_DENIED);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user