summaryrefslogtreecommitdiff
path: root/modules/commands/cs_getkey.cpp
diff options
context:
space:
mode:
authorlethality <lethality@anope.org>2012-06-22 21:26:33 +0100
committerlethality <lethality@anope.org>2012-06-22 21:26:33 +0100
commitd8a99d619f7ae301ecf188dc460b1f5c7cb791ac (patch)
treeb327ce05b9b5cb598fbc829e48041d465bc2d579 /modules/commands/cs_getkey.cpp
parentba53c7eb03add30acefbbc95bbd8b4b825b465b0 (diff)
parent2dec8e767a70def4b9b04a96ae4f75e4d1013038 (diff)
Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'modules/commands/cs_getkey.cpp')
-rw-r--r--modules/commands/cs_getkey.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/commands/cs_getkey.cpp b/modules/commands/cs_getkey.cpp
index f8164707d..e0205ad03 100644
--- a/modules/commands/cs_getkey.cpp
+++ b/modules/commands/cs_getkey.cpp
@@ -26,7 +26,6 @@ class CommandCSGetKey : public Command
{
const Anope::string &chan = params[0];
- User *u = source.u;
ChannelInfo *ci = cs_findchan(params[0]);
if (ci == NULL)
{
@@ -34,8 +33,7 @@ class CommandCSGetKey : public Command
return;
}
-
- if (!ci->AccessFor(u).HasPriv("GETKEY") && !u->HasCommand("chanserv/getkey"))
+ if (!source.AccessFor(ci).HasPriv("GETKEY") && !source.HasCommand("chanserv/getkey"))
{
source.Reply(ACCESS_DENIED);
return;
@@ -48,8 +46,8 @@ class CommandCSGetKey : public Command
return;
}
- bool override = !ci->AccessFor(u).HasPriv("GETKEY");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci);
+ bool override = !source.AccessFor(ci).HasPriv("GETKEY");
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci);
source.Reply(_("Key for channel \002%s\002 is \002%s\002."), chan.c_str(), key.c_str());
return;