From 0632c7946c9835f24049b8cf9130409206796b33 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 17 Dec 2006 02:18:03 +0000 Subject: 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 --- src/modules/m_spanningtree.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree.cpp') 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; } -- cgit v1.2.3