summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-05 01:00:39 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-05 01:00:39 +0000
commit24966a054df0e63b265d442a032f0331900ffbae (patch)
treec55ded9721511d5e17b0f2037a57254ce1116319 /src/modules/m_spanningtree.cpp
parent1fbd75d645e2b4243ebec65bb8952069b24253b9 (diff)
Added the <options:notimesync> flag to disable time syncing
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5650 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r--src/modules/m_spanningtree.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index c5c6bc061..2a77e39dd 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -125,6 +125,9 @@ class SpanningTreeUtilities
/** Announce TS changes to channels on merge
*/
bool AnnounceTSChange;
+ /** Synchronize timestamps between servers
+ */
+ bool EnableTimeSync;
/** Socket bindings for listening sockets
*/
std::vector<TreeSocket*> Bindings;
@@ -2693,7 +2696,7 @@ class TreeSocket : public InspSocket
bool HandleSetTime(const std::string &prefix, std::deque<std::string> &params)
{
- if (!params.size())
+ if (!params.size() || !Utils->EnableTimeSync)
return true;
bool force = false;
@@ -3113,7 +3116,7 @@ class TreeSocket : public InspSocket
}
else if (command == "BURST")
{
- if (params.size())
+ if (params.size() && Utils->EnableTimeSync)
{
/* If a time stamp is provided, apply synchronization */
bool force = false;
@@ -3895,6 +3898,7 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind)
FlatLinks = Conf->ReadFlag("options","flatlinks",0);
HideULines = Conf->ReadFlag("options","hideulines",0);
AnnounceTSChange = Conf->ReadFlag("options","announcets",0);
+ EnableTimeSync = !(Conf->ReadFlag("options","notimesync",0));
LinkBlocks.clear();
ValidIPs.clear();
for (int j =0; j < Conf->Enumerate("link"); j++)
@@ -4006,8 +4010,13 @@ class ModuleSpanningTree : public Module
command_rconnect = new cmd_rconnect(ServerInstance, this, Utils);
ServerInstance->AddCommand(command_rconnect);
- SyncTimer = new TimeSyncTimer(ServerInstance, this);
- ServerInstance->Timers->AddTimer(SyncTimer);
+ if (Utils->EnableTimeSync)
+ {
+ SyncTimer = new TimeSyncTimer(ServerInstance, this);
+ ServerInstance->Timers->AddTimer(SyncTimer);
+ }
+ else
+ SyncTimer = NULL;
}
void ShowLinks(TreeServer* Current, userrec* user, int hops)