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/servers.cpp | |
parent | f237405a52f6b8efb606c5181ffe3bd75a6a6a8a (diff) |
Get rid of relying on if(this) in WhoSends()
Diffstat (limited to 'src/servers.cpp')
-rw-r--r-- | src/servers.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/servers.cpp b/src/servers.cpp index 7747f4a69..d1fa2bf26 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -127,6 +127,8 @@ void Server::Burst() bi->introduced = true; } + ServiceBot *chanserv = Config->GetClient("ChanServ"); + for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it) { Channel *c = it->second; @@ -142,11 +144,11 @@ void Server::Burst() ChannelMode *cm = ModeManager::FindChannelModeByName(it2->first); if (!cm || cm->type != MODE_LIST) continue; - ModeManager::StackerAdd(c->ci->WhoSends(), c, cm, true, it2->second); + ModeManager::StackerAdd(nullptr, c, cm, true, it2->second); } if (!c->topic.empty() && !c->topic_setter.empty()) - IRCD->Send<messages::Topic>(c->ci->WhoSends(), c, c->topic, c->topic_ts, c->topic_setter); + IRCD->Send<messages::Topic>(c->ci ? c->ci->WhoSends() : chanserv, c, c->topic, c->topic_ts, c->topic_setter); c->syncing = true; } |