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_messageflood.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_messageflood.cpp') diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index 0707e6ae4..af976afd5 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -83,8 +83,8 @@ class MsgFlood : public ParamMode > /* Set up the flood parameters for this channel */ bool ban = (parameter[0] == '*'); - unsigned int nlines = ConvToInt(parameter.substr(ban ? 1 : 0, ban ? colon-1 : colon)); - unsigned int nsecs = ConvToInt(parameter.substr(colon+1)); + unsigned int nlines = ConvToNum(parameter.substr(ban ? 1 : 0, ban ? colon-1 : colon)); + unsigned int nsecs = ConvToNum(parameter.substr(colon+1)); if ((nlines<2) || (nsecs<1)) { -- cgit v1.3.1-10-gc9f91