aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/servercommand.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2018-12-12 20:34:46 +0000
committerGravatar Peter Powell2018-12-12 21:43:24 +0000
commit0f7cfd46ef2d277f5f82e34a2852c75212d75261 (patch)
tree73445b54ad2ce50ae75999ec9f939ff1097b057a /src/modules/m_spanningtree/servercommand.cpp
parentFix not rejecting invalid durations in DCCALLOW. (diff)
Fix conversion issues by replacing ConvToInt with ConvToNum<T>.
The former was a thin wrapper around atol and brought with it all of the weird parsing logic of atol which is almost never what is actually wanted. It also almost never returned the numeric type which is actually wanted which can cause weird issues when casting.
Diffstat (limited to 'src/modules/m_spanningtree/servercommand.cpp')
-rw-r--r--src/modules/m_spanningtree/servercommand.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/servercommand.cpp b/src/modules/m_spanningtree/servercommand.cpp
index 5b8152846..2f5c7ea3e 100644
--- a/src/modules/m_spanningtree/servercommand.cpp
+++ b/src/modules/m_spanningtree/servercommand.cpp
@@ -40,7 +40,7 @@ RouteDescriptor ServerCommand::GetRouting(User* user, const Params& parameters)
time_t ServerCommand::ExtractTS(const std::string& tsstr)
{
- time_t TS = ConvToInt(tsstr);
+ time_t TS = ConvToNum<time_t>(tsstr);
if (!TS)
throw ProtocolException("Invalid TS");
return TS;