From 73fb94c55344b6ad788c925bf13325236402891f Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 27 Aug 2010 13:44:30 -0400 Subject: Added an Anope::string::is_pos_number_only function to use everywhere we convertTo unsigned values, and fixed the mail delay error message to give the correct time. --- modules/core/os_news.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/core/os_news.cpp') diff --git a/modules/core/os_news.cpp b/modules/core/os_news.cpp index 8c159b32d..c12f66756 100644 --- a/modules/core/os_news.cpp +++ b/modules/core/os_news.cpp @@ -246,7 +246,7 @@ class NewsBase : public Command } if (!text.equals_ci("ALL")) { - num = text.is_number_only() ? convertTo(text) : 0; + num = text.is_pos_number_only() ? convertTo(text) : 0; if (num > 0 && del_newsitem(num, type)) { notice_lang(Config->s_OperServ, u, msgs[MSG_DELETED], num); @@ -440,7 +440,7 @@ class OSNews : public Module if (params[0].equals_ci("OS") && params.size() >= 7 && params[1].equals_ci("NEWS")) { NewsItem *n = new NewsItem(); - n->num = params[2].is_number_only() ? convertTo(params[2]) : 0; + n->num = params[2].is_pos_number_only() ? convertTo(params[2]) : 0; n->time = params[3].is_number_only() ? convertTo(params[3]) : 0; n->who = params[4]; if (params[5].equals_ci("LOGON")) -- cgit