summaryrefslogtreecommitdiff
path: root/modules/commands/cs_kick.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_kick.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_kick.cpp')
-rw-r--r--modules/commands/cs_kick.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/commands/cs_kick.cpp b/modules/commands/cs_kick.cpp
index 3ee444698..97d879416 100644
--- a/modules/commands/cs_kick.cpp
+++ b/modules/commands/cs_kick.cpp
@@ -29,7 +29,7 @@ class CommandCSKick : public Command
const Anope::string &target = params[1];
const Anope::string &reason = params.size() > 2 ? params[2] : "Requested";
- User *u = source.u;
+ User *u = source.GetUser();
ChannelInfo *ci = cs_findchan(params[0]);
Channel *c = findchan(params[0]);
User *u2 = finduser(target);
@@ -45,7 +45,7 @@ class CommandCSKick : public Command
return;
}
- AccessGroup u_access = ci->AccessFor(u);
+ AccessGroup u_access = source.AccessFor(ci);
if (!u_access.HasPriv("KICK"))
source.Reply(ACCESS_DENIED);
@@ -61,17 +61,17 @@ class CommandCSKick : public Command
else
{
// XXX
- Log(LOG_COMMAND, u, this, ci) << "for " << u2->nick;
+ Log(LOG_COMMAND, source, this, ci) << "for " << u2->nick;
if (ci->HasFlag(CI_SIGNKICK) || (ci->HasFlag(CI_SIGNKICK_LEVEL) && !u_access.HasPriv("SIGNKICK")))
- c->Kick(ci->WhoSends(), u2, "%s (%s)", reason.c_str(), u->nick.c_str());
+ c->Kick(ci->WhoSends(), u2, "%s (%s)", reason.c_str(), source.GetNick().c_str());
else
c->Kick(ci->WhoSends(), u2, "%s", reason.c_str());
}
}
else if (u_access.HasPriv("FOUNDER"))
{
- Log(LOG_COMMAND, u, this, ci) << "for " << target;
+ Log(LOG_COMMAND, source, this, ci) << "for " << target;
int matched = 0, kicked = 0;
for (CUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end;)
@@ -90,7 +90,7 @@ class CommandCSKick : public Command
++kicked;
if (ci->HasFlag(CI_SIGNKICK) || (ci->HasFlag(CI_SIGNKICK_LEVEL) && !u_access.HasPriv("SIGNKICK")))
- c->Kick(ci->WhoSends(), uc->user, "%s (Matches %s) (%s)", reason.c_str(), target.c_str(), u->nick.c_str());
+ c->Kick(ci->WhoSends(), uc->user, "%s (Matches %s) (%s)", reason.c_str(), target.c_str(), source.GetNick().c_str());
else
c->Kick(ci->WhoSends(), uc->user, "%s (Matches %s)", reason.c_str(), target.c_str());
}