summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-08 13:32:11 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-08 13:32:11 +0000
commitcb3dbc978b4cc642fc1d264443ebfeae6d7d12c4 (patch)
tree41dca904d2852a70e0de64aab792368dfe016b58 /src/modules
parentbd155d530887b2cafb775b9783a938de0250c348 (diff)
Allow for fallback of older ircds without TS in BURST command
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3553 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 7f3261684..966fcca18 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -2271,17 +2271,21 @@ class TreeSocket : public InspSocket
}
else if (command == "BURST")
{
- time_t THEM = atoi(params[0].c_str());
- long delta = THEM-time(NULL);
- if ((delta < -600) || (delta > 600))
+ if (params.count())
{
- WriteOpers("*** \2ERROR\2: Your clocks are out by %d seconds (this is more than ten minutes). Link aborted, \2PLEASE SYNC YOUR CLOCKS!\2",abs(delta));
- this->WriteLine("ERROR :Your clocks are out by "+ConvToStr(abs(delta))+" seconds (this is more than ten minutes). Link aborted, PLEASE SYNC YOUR CLOCKS!");
- return false;
- }
- else if ((delta < -60) || (delta > 60))
- {
- WriteOpers("*** \2WARNING\2: Your clocks are out by %d seconds, please consider synching your clocks.",abs(delta));
+ /* If a time stamp is provided, try and check syncronization */
+ time_t THEM = atoi(params[0].c_str());
+ long delta = THEM-time(NULL);
+ if ((delta < -600) || (delta > 600))
+ {
+ WriteOpers("*** \2ERROR\2: Your clocks are out by %d seconds (this is more than ten minutes). Link aborted, \2PLEASE SYNC YOUR CLOCKS!\2",abs(delta));
+ this->WriteLine("ERROR :Your clocks are out by "+ConvToStr(abs(delta))+" seconds (this is more than ten minutes). Link aborted, PLEASE SYNC YOUR CLOCKS!");
+ return false;
+ }
+ else if ((delta < -60) || (delta > 60))
+ {
+ WriteOpers("*** \2WARNING\2: Your clocks are out by %d seconds, please consider synching your clocks.",abs(delta));
+ }
}
this->LinkState = CONNECTED;
Node = new TreeServer(InboundServerName,InboundDescription,TreeRoot,this);