aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_topiclock.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_topiclock.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_topiclock.cpp')
-rw-r--r--src/modules/m_topiclock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_topiclock.cpp b/src/modules/m_topiclock.cpp
index c65f27668..b0d004b1c 100644
--- a/src/modules/m_topiclock.cpp
+++ b/src/modules/m_topiclock.cpp
@@ -48,7 +48,7 @@ class CommandSVSTOPIC : public Command
if (parameters.size() == 4)
{
// 4 parameter version, set all topic data on the channel to the ones given in the parameters
- time_t topicts = ConvToInt(parameters[1]);
+ time_t topicts = ConvToNum<time_t>(parameters[1]);
if (!topicts)
{
ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Received SVSTOPIC with a 0 topicts, dropped.");