summaryrefslogtreecommitdiff
path: root/modules/botserv/control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/botserv/control.cpp')
-rw-r--r--modules/botserv/control.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/botserv/control.cpp b/modules/botserv/control.cpp
index 584e8eded..758f795f2 100644
--- a/modules/botserv/control.cpp
+++ b/modules/botserv/control.cpp
@@ -59,7 +59,8 @@ class CommandBSSay : public Command
return;
}
- if (!ci->c || !ci->c->FindUser(ci->GetBot()))
+ Channel *c = ci->GetChannel();
+ if (!c || !c->FindUser(ci->GetBot()))
{
source.Reply(_("Bot \002{0}\002 is not on channel \002{1}\002."), ci->GetBot()->nick, ci->GetName());
return;
@@ -130,7 +131,8 @@ class CommandBSAct : public Command
return;
}
- if (!ci->c || !ci->c->FindUser(ci->GetBot()))
+ Channel *c = ci->GetChannel();
+ if (!c || !c->FindUser(ci->GetBot()))
{
source.Reply(_("Bot \002{0}\002 is not on channel \002{1}\002."), ci->GetBot()->nick, ci->GetName());
return;