summaryrefslogtreecommitdiff
path: root/modules/commands/bs_control.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/bs_control.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/bs_control.cpp')
-rw-r--r--modules/commands/bs_control.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/commands/bs_control.cpp b/modules/commands/bs_control.cpp
index 6ca435b37..6957d0a78 100644
--- a/modules/commands/bs_control.cpp
+++ b/modules/commands/bs_control.cpp
@@ -26,8 +26,6 @@ class CommandBSSay : public Command
{
const Anope::string &text = params[1];
- User *u = source.u;
-
ChannelInfo *ci = cs_findchan(params[0]);
if (ci == NULL)
{
@@ -35,7 +33,7 @@ class CommandBSSay : public Command
return;
}
- if (!ci->AccessFor(u).HasPriv("SAY"))
+ if (!source.AccessFor(ci).HasPriv("SAY"))
{
source.Reply(ACCESS_DENIED);
return;
@@ -63,7 +61,7 @@ class CommandBSSay : public Command
ci->bi->lastmsg = Anope::CurTime;
// XXX need a way to find if someone is overriding this
- Log(LOG_COMMAND, u, this, ci) << text;
+ Log(LOG_COMMAND, source, this, ci) << text;
return;
}
@@ -88,7 +86,6 @@ class CommandBSAct : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
- User *u = source.u;
Anope::string message = params[1];
ChannelInfo *ci = cs_findchan(params[0]);
@@ -98,7 +95,7 @@ class CommandBSAct : public Command
return;
}
- if (!ci->AccessFor(u).HasPriv("SAY"))
+ if (!source.AccessFor(ci).HasPriv("SAY"))
{
source.Reply(ACCESS_DENIED);
return;
@@ -124,7 +121,7 @@ class CommandBSAct : public Command
ci->bi->lastmsg = Anope::CurTime;
// XXX Need to be able to find if someone is overriding this.
- Log(LOG_COMMAND, u, this, ci) << message;
+ Log(LOG_COMMAND, source, this, ci) << message;
return;
}