summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-04 22:37:11 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-04 22:37:11 +0000
commitedd95854edea5082dd56c0bcd267d0f52b8a6f8a (patch)
tree13b9942f4f1979fb86272302ceb6d0bc5487167d /src/modules/m_spanningtree
parentc83932ecfda0359e1b9a6bb5a48c8dafc80737ab (diff)
Add options:quietbursts, fixes bug #269, also adds support for quits in a cull list which do not generate a quit snotice
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6883 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp3
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp6
-rw-r--r--src/modules/m_spanningtree/utils.cpp1
-rw-r--r--src/modules/m_spanningtree/utils.h3
4 files changed, 12 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 2bcfecf2b..0c9509ada 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -144,6 +144,9 @@ int TreeServer::QuitUsers(const std::string &reason)
userrec::QuitUser(ServerInstance, a, "*.net *.split", reason_s);
else
userrec::QuitUser(ServerInstance, a, reason_s);
+
+ if (this->Utils->quiet_bursts)
+ ServerInstance->GlobalCulls.MakeSilent(a);
}
}
return time_to_die.size();
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 6176d0201..66d223fa6 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -1103,7 +1103,11 @@ bool TreeSocket::IntroduceClient(const std::string &source, std::deque<std::stri
Instance->AddGlobalClone(_new);
- if (!this->Instance->SilentULine(_new->server))
+ bool send = (!this->Instance->SilentULine(_new->server));
+ if (send)
+ send = (this->Utils->quiet_bursts && !this->bursting);
+
+ if (send)
this->Instance->SNO->WriteToSnoMask('C',"Client connecting at %s: %s!%s@%s [%s]",_new->server,_new->nick,_new->ident,_new->host, _new->GetIPString());
params[7] = ":" + params[7];
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 923308de0..e1026ca94 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -477,6 +477,7 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind)
EnableTimeSync = Conf->ReadFlag("timesync","enable",0);
MasterTime = Conf->ReadFlag("timesync", "master", 0);
ChallengeResponse = !Conf->ReadFlag("options", "disablehmac", 0);
+ quiet_bursts = Conf->ReadFlag("options", "quietbursts", 0);
LinkBlocks.clear();
ValidIPs.clear();
for (int j =0; j < Conf->Enumerate("link"); j++)
diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h
index 2fd53bb43..0e289146b 100644
--- a/src/modules/m_spanningtree/utils.h
+++ b/src/modules/m_spanningtree/utils.h
@@ -63,6 +63,9 @@ class SpanningTreeUtilities
/** Synchronize timestamps between servers
*/
bool EnableTimeSync;
+ /** Make snomasks +CQ quiet during bursts and splits
+ */
+ bool quiet_bursts;
/** Socket bindings for listening sockets
*/
std::vector<TreeSocket*> Bindings;