diff options
author | Adam <Adam@anope.org> | 2017-03-19 18:36:03 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-03-19 18:36:03 -0400 |
commit | 2a886acbedb6b6386dbff3e591b0d4035d516b2a (patch) | |
tree | 765218b2fc476e9b1517d7f1e4aa78f57de87752 /src/channels.cpp | |
parent | f237405a52f6b8efb606c5181ffe3bd75a6a6a8a (diff) |
Get rid of relying on if(this) in WhoSends()
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 2b9ea438d..bf5b22183 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -767,9 +767,6 @@ bool Channel::Kick(User *source, User *u, const Anope::string &reason) if (u->IsProtected()) return false; - if (source == NULL) - source = this->ci->WhoSends(); - if (!this->KickInternal(source, u->nick, reason)) return false; IRCD->SendKick(source, this, u, reason); @@ -794,7 +791,7 @@ void Channel::ChangeTopic(const Anope::string &user, const Anope::string &newtop this->topic_setter = user; this->topic_ts = ts; - IRCD->Send<messages::Topic>(this->ci->WhoSends(), this, newtopic, ts, user); + IRCD->Send<messages::Topic>(this->ci ? this->ci->WhoSends() : Config->GetClient("ChanServ"), this, newtopic, ts, user); /* Now that the topic is set update the time set. This is *after* we set it so the protocol modules are able to tell the old last set time */ this->topic_time = Anope::CurTime; |