From 0f7cfd46ef2d277f5f82e34a2852c75212d75261 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 12 Dec 2018 20:34:46 +0000 Subject: Fix conversion issues by replacing ConvToInt with ConvToNum. 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. --- src/modules/m_spanningtree/svsnick.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree/svsnick.cpp') diff --git a/src/modules/m_spanningtree/svsnick.cpp b/src/modules/m_spanningtree/svsnick.cpp index 2514dfd6f..a734dc8ed 100644 --- a/src/modules/m_spanningtree/svsnick.cpp +++ b/src/modules/m_spanningtree/svsnick.cpp @@ -47,7 +47,7 @@ CmdResult CommandSVSNick::Handle(User* user, Params& parameters) // won't happen because the timestamps won't match. if (parameters.size() > 3) { - time_t ExpectedTS = ConvToInt(parameters[3]); + time_t ExpectedTS = ConvToNum(parameters[3]); if (u->age != ExpectedTS) return CMD_FAILURE; // Ignore SVSNICK } @@ -56,7 +56,7 @@ CmdResult CommandSVSNick::Handle(User* user, Params& parameters) if (isdigit(nick[0])) nick = u->uuid; - time_t NickTS = ConvToInt(parameters[2]); + time_t NickTS = ConvToNum(parameters[2]); if (NickTS <= 0) return CMD_FAILURE; -- cgit v1.3.1-10-gc9f91