summaryrefslogtreecommitdiff
path: root/src/servers.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-03-19 18:36:03 -0400
committerAdam <Adam@anope.org>2017-03-19 18:36:03 -0400
commit2a886acbedb6b6386dbff3e591b0d4035d516b2a (patch)
tree765218b2fc476e9b1517d7f1e4aa78f57de87752 /src/servers.cpp
parentf237405a52f6b8efb606c5181ffe3bd75a6a6a8a (diff)
Get rid of relying on if(this) in WhoSends()
Diffstat (limited to 'src/servers.cpp')
-rw-r--r--src/servers.cpp6
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;
}