summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-03-14 22:13:04 -0400
committerAdam <Adam@anope.org>2014-03-14 22:13:04 -0400
commitef9729fb02dd3e44f59b447b567cdeb450690344 (patch)
tree8f1e96edb96192e78ebb5502ac09205f30f40b5a
parent296a75f2a9e29dc7f19f4286211fcc1eb7983b1d (diff)
Mark all channels as syncing when we connect to our uplink. They will
finish syncing later when the uplink syncs. Normally the channel state is fully synced here anyway, except if we do not know the modes the uplink has yet. Also fix a related issue with resetting chanels and bouncing modes on our clients, if this is done prior to knowing which modes exist it would silently fail.
-rw-r--r--src/channels.cpp4
-rw-r--r--src/servers.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 86c261029..decc3c77f 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -78,8 +78,12 @@ void Channel::Reset()
/* reset modes for my clients */
if (uc->user->server == Me)
+ {
for (size_t i = 0; i < f.Modes().length(); ++i)
this->SetMode(NULL, ModeManager::FindChannelModeByChar(f.Modes()[i]), uc->user->GetUID(), false);
+ /* Modes might not exist yet, so be sure the status is really reset */
+ uc->status = f;
+ }
}
for (ChanUserList::const_iterator it = this->users.begin(), it_end = this->users.end(); it != it_end; ++it)
diff --git a/src/servers.cpp b/src/servers.cpp
index 0adeb6727..3f698815c 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -127,6 +127,8 @@ Server::Server(Server *up, const Anope::string &sname, unsigned shops, const Ano
if (!c->topic.empty() && !c->topic_setter.empty())
IRCD->SendTopic(c->ci->WhoSends(), c);
+
+ c->syncing = true;
}
}
}