summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-17 02:18:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-17 02:18:03 +0000
commit0632c7946c9835f24049b8cf9130409206796b33 (patch)
tree8d71ec6ba2d36ae5d92bd38efdbbe30b4535c980 /src/modules/m_spanningtree.cpp
parenta5af52146d191612484cdf010a2bda0dfb385ab5 (diff)
When receiving an FJOIN, if we have no local users, dont send deops, this just contributes to pointless server noise
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6028 e03df62e-2008-0410-955e-edbf42e46eb7
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;
}