aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/fmode.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2014-04-16 13:20:39 +0200
committerGravatar Attila Molnar2014-04-16 13:20:39 +0200
commit67e0e32b86885df705a92cdc971a6085c4a7c1ba (patch)
tree1f3ba6b2d1d4f240c287d8ff11d30e98561e7adb /src/modules/m_spanningtree/fmode.cpp
parentm_spanningtree Throw an exception on protocol violations instead of returning... (diff)
m_spanningtree Add ServerCommand::ExtractTS() to convert string to raw TS
Throws a ProtocolException if the input is invalid
Diffstat (limited to 'src/modules/m_spanningtree/fmode.cpp')
-rw-r--r--src/modules/m_spanningtree/fmode.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/fmode.cpp b/src/modules/m_spanningtree/fmode.cpp
index 5627b023b..036a94947 100644
--- a/src/modules/m_spanningtree/fmode.cpp
+++ b/src/modules/m_spanningtree/fmode.cpp
@@ -24,13 +24,7 @@
/** FMODE command - server mode with timestamp checks */
CmdResult CommandFMode::Handle(User* who, std::vector<std::string>& params)
{
- time_t TS = ConvToInt(params[1]);
- if (!TS)
- {
- ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "*** BUG? *** TS of 0 sent to FMODE. Are some services authors smoking craq, or is it 1970 again?. Dropping link.");
- ServerInstance->SNO->WriteToSnoMask('d', "WARNING: The server %s is sending FMODE with a TS of zero. Total craq, dropping link.", who->server->GetName().c_str());
- return CMD_INVALID;
- }
+ time_t TS = ServerCommand::ExtractTS(params[1]);
/* Extract the TS value of the object, either User or Channel */
time_t ourTS;