summaryrefslogtreecommitdiff
path: root/modules/commands/cs_unban.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_unban.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_unban.cpp')
-rw-r--r--modules/commands/cs_unban.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/commands/cs_unban.cpp b/modules/commands/cs_unban.cpp
index 24d9caab8..91776b0c0 100644
--- a/modules/commands/cs_unban.cpp
+++ b/modules/commands/cs_unban.cpp
@@ -24,8 +24,6 @@ class CommandCSUnban : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
- User *u = source.u;
-
ChannelInfo *ci = cs_findchan(params[0]);
if (ci == NULL)
{
@@ -39,13 +37,13 @@ class CommandCSUnban : public Command
return;
}
- if (!ci->AccessFor(u).HasPriv("UNBAN"))
+ if (!source.AccessFor(ci).HasPriv("UNBAN"))
{
source.Reply(ACCESS_DENIED);
return;
}
- User *u2 = u;
+ User *u2 = source.GetUser();
if (params.size() > 1)
u2 = finduser(params[1]);
@@ -55,8 +53,8 @@ class CommandCSUnban : public Command
return;
}
- common_unban(ci, u2, u == u2);
- if (u2 == u)
+ common_unban(ci, u2, source.GetUser() == u2);
+ if (u2 == source.GetUser())
source.Reply(_("You have been unbanned from \002%s\002."), ci->c->name.c_str());
else
source.Reply(_("\002%s\002 has been unbanned from \002%s\002."), u2->nick.c_str(), ci->c->name.c_str());