From 2d35c3396a1f00375d45b874dafb9e0bdb520a9b Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 13 Aug 2019 20:11:11 +0100 Subject: Fix some remaining uses of ato[il]. --- src/modules/extra/m_pgsql.cpp | 2 +- src/modules/m_delaymsg.cpp | 2 +- src/modules/m_xline_db.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules') diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 5d059ec9c..37cf92704 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -103,7 +103,7 @@ class PgSQLresult : public SQL::Result { rows = PQntuples(res); if (!rows) - rows = atoi(PQcmdTuples(res)); + rows = ConvToNum(PQcmdTuples(res)); } ~PgSQLresult() diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index 04d4119c7..cf26df8c1 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -34,7 +34,7 @@ class DelayMsgMode : public ParamMode bool ResolveModeConflict(std::string& their_param, const std::string& our_param, Channel*) CXX11_OVERRIDE { - return (atoi(their_param.c_str()) < atoi(our_param.c_str())); + return ConvToNum(their_param) < ConvToNum(our_param); } ModeAction OnSet(User* source, Channel* chan, std::string& parameter) CXX11_OVERRIDE; diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index 00605f259..97531aae8 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -211,8 +211,8 @@ class ModuleXLineDB continue; } - XLine* xl = xlf->Generate(ServerInstance->Time(), atoi(command_p[5].c_str()), command_p[3], command_p[6], command_p[2]); - xl->SetCreateTime(atoi(command_p[4].c_str())); + XLine* xl = xlf->Generate(ServerInstance->Time(), ConvToNum(command_p[5]), command_p[3], command_p[6], command_p[2]); + xl->SetCreateTime(ConvToNum(command_p[4])); if (ServerInstance->XLines->AddLine(xl, NULL)) { -- cgit v1.3.1-10-gc9f91