diff options
author | Robby- <robby@chat.be> | 2013-10-04 05:45:28 +0200 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-10-05 00:33:03 -0400 |
commit | 97d7c21193c490f647ee059dd28d4a37a684cbb1 (patch) | |
tree | 7ec955a2a18d266d79739388511d8a053715340c /modules/commands/cs_access.cpp | |
parent | e5b8435769f9c5aa5326a60811cfae6fda2f5807 (diff) |
Fix logging for log type 'other'.
os_ignore: Log expired ignores to the normal log level.
cs_drop: Allow Services Operators to actually drop channels in Read-Only mode.
os_akill, os_sxline, cs_akick: Log deletions by number.
Diffstat (limited to 'modules/commands/cs_access.cpp')
-rw-r--r-- | modules/commands/cs_access.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 91f9cff4f..0ecf95106 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -222,10 +222,11 @@ class CommandCSAccess : public Command Command *c; unsigned deleted; Anope::string Nicks; - bool Denied; + bool denied; bool override; + AccessGroup ag; public: - AccessDelCallback(CommandSource &_source, ChannelInfo *_ci, Command *_c, const Anope::string &numlist) : NumberList(numlist, true), source(_source), ci(_ci), c(_c), deleted(0), Denied(false), override(false) + AccessDelCallback(CommandSource &_source, ChannelInfo *_ci, Command *_c, const Anope::string &numlist) : NumberList(numlist, true), source(_source), ci(_ci), c(_c), deleted(0), denied(false), override(false), ag(source.AccessFor(ci)) { if (!source.AccessFor(ci).HasPriv("ACCESS_CHANGE") && source.HasPriv("chanserv/access/modify")) this->override = true; @@ -233,7 +234,7 @@ class CommandCSAccess : public Command ~AccessDelCallback() { - if (Denied && !deleted) + if (denied && !deleted) source.Reply(ACCESS_DENIED); else if (!deleted) source.Reply(_("No matching entries on %s access list."), ci->name.c_str()); @@ -255,12 +256,11 @@ class CommandCSAccess : public Command ChanAccess *access = ci->GetAccess(Number - 1); - AccessGroup u_access = source.AccessFor(ci); - const ChanAccess *u_highest = u_access.Highest(); + const ChanAccess *u_highest = ag.Highest(); - if ((!u_highest || *u_highest <= *access) && !u_access.founder && !this->override && !access->mask.equals_ci(source.nc->display)) + if ((!u_highest || *u_highest <= *access) && !ag.founder && !this->override && !access->mask.equals_ci(source.nc->display)) { - Denied = true; + denied = true; return; } |