diff options
-rw-r--r-- | modules/protocol/inspircd20.cpp | 6 | ||||
-rw-r--r-- | src/messages.cpp | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index 443910329..993c43b7a 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -821,7 +821,7 @@ class ProtoInspIRCd : public Module void OnChanRegistered(ChannelInfo *ci) anope_override { - if (use_server_side_mlock && ci->c) + if (use_server_side_mlock && ci->c && !ci->GetMLockAsString(false).empty()) { Anope::string modes = ci->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", ""); SendChannelMetadata(ci->c, "mlock", modes); @@ -829,8 +829,8 @@ class ProtoInspIRCd : public Module if (use_server_side_topiclock && Servers::Capab.count("TOPICLOCK") && ci->c) { - Anope::string on = ci->HasExt("TOPICLOCK") ? "1" : ""; - SendChannelMetadata(ci->c, "topiclock", on); + if (ci->HasExt("TOPICLOCK")) + SendChannelMetadata(ci->c, "topiclock", "1"); } } diff --git a/src/messages.cpp b/src/messages.cpp index ed601a206..1c7b956d1 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -147,7 +147,9 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co { c->Shrink("SYNCING"); /* Sync the channel (mode lock, topic, etc) */ - c->Sync(); + /* the channel is synced when the netmerge is complete */ + if (Me && Me->IsSynced()) + c->Sync(); } } |