summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-02-14 11:09:53 -0500
committerAdam <Adam@anope.org>2014-02-14 11:09:53 -0500
commit5dfa6598c2aaf0e1b64315b7869a2e7d5e357fe1 (patch)
tree28ea6fd959a67ad84d72ce4ad68d7c725b5ed3dc /src/channels.cpp
parentf428d6104510df6ed5ddb65e3baf86eeade6e069 (diff)
Do not sync channels in Channel::Reset if they are in the middle of syncing, and checkmodes in Channel::Sync. Fixes channel modes sometimes not being set if always_lower_ts is on
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 072634253..27e186b83 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -85,13 +85,17 @@ void Channel::Reset()
for (ChanUserList::const_iterator it = this->users.begin(), it_end = this->users.end(); it != it_end; ++it)
this->SetCorrectModes(it->second->user, true);
- this->Sync();
+ // If the channel is syncing now, do not force a sync due to Reset(), as we are probably iterating over users in Message::SJoin
+ // A sync will come soon
+ if (!syncing)
+ this->Sync();
}
void Channel::Sync()
{
syncing = false;
FOREACH_MOD(OnChannelSync, (this));
+ CheckModes();
}
void Channel::CheckModes()