summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r--src/modules/m_spanningtree.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index f1384255c..f423f7617 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1627,6 +1627,20 @@ class TreeSocket : public InspSocket
else
created = true; /* don't perform deops, and set TS to correct time after processing. */
+ /* Check if there are any local users on this channel. If there are not, set created = true.
+ * If there are no local users here, theres no need for us to bounce the modes, we leave this
+ * to servers which do have local users and save some bandwidth and prevent spurious deops
+ */
+ if (!created)
+ {
+ CUList elist;
+ TreeServerList list;
+ Utils->GetListOfServersForChannel(chan, list, 0, elist);
+ if (list.find(Utils->TreeRoot) == list.end())
+ created = true;
+ }
+
+
/* In 1.1, if they have the newer channel, we immediately clear
* all status modes from our users. We then accept their modes.
* If WE have the newer channel its the other side's job to do this.
@@ -1642,11 +1656,11 @@ class TreeSocket : public InspSocket
chan->WriteChannelWithServ(Instance->Config->ServerName,
"NOTICE %s :TS for %s changed from %lu to %lu", chan->name, chan->name, ourTS, TS);
ourTS = TS;
- param_list.push_back(channel);
/* Zap all the privilage modes on our side, if the channel exists here */
if (!created)
{
+ param_list.push_back(channel);
this->RemoveStatus(Instance->Config->ServerName, param_list);
chan->age = TS;
}