mirror of
https://github.com/anope/anope.git
synced 2026-07-03 16:33:13 +02:00
improved handling of mlocks and topiclocks on inspircd
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user