summaryrefslogtreecommitdiff
path: root/src/messages.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-02-07 21:44:37 -0500
committerAdam <Adam@anope.org>2013-02-07 21:49:49 -0500
commit01413dd3cc5e9984b5278b613bc2ef8abc1267d7 (patch)
tree9df562b049157a3cc2b3245eac64940df3ecd253 /src/messages.cpp
parent9d1fe6102c403e1d66f05463c5088e47682f9e01 (diff)
Use channel mode +r to determine if a channel has either been newly created or
created while we were offline (eg, during the inital burst to the uplink). Fixes not knowing whether or not channels ops in non-secureop non-persistent channels obtained op while we were offline by creating the channel or legitimately by being set op by another channel op.
Diffstat (limited to 'src/messages.cpp')
-rw-r--r--src/messages.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/messages.cpp b/src/messages.cpp
index 6a60d9cd9..dc11b99b4 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -107,7 +107,10 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co
/* Update the modes for the channel */
if (keep_their_modes && !modes.empty())
- c->SetModesInternal(source, modes);
+ /* If we are syncing, mlock is checked later in Channel::Sync. It is important to not check it here
+ * so that Channel::SetCorrectModes can correctly detect the presence of channel mode +r.
+ */
+ c->SetModesInternal(source, modes, ts, !c->HasExt("SYNCING"));
for (std::list<SJoinUser>::const_iterator it = users.begin(), it_end = users.end(); it != it_end; ++it)
{