diff options
author | Adam <Adam@anope.org> | 2011-02-06 20:49:36 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-02-06 20:49:36 -0500 |
commit | ebe0ce6610e10f192303cab487d060ac946d021d (patch) | |
tree | 59ad5fd1c9d30e9af44bbddde5e5cd405b5b87ac | |
parent | b2e52553a722e3d26606490b81097c82e36ecf57 (diff) |
Fixed a compiler warning in os_news
-rw-r--r-- | modules/core/os_news.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/core/os_news.cpp b/modules/core/os_news.cpp index 0edb61cca..a3cddd309 100644 --- a/modules/core/os_news.cpp +++ b/modules/core/os_news.cpp @@ -213,7 +213,6 @@ class NewsBase : public Command CommandReturn DoDel(User *u, const std::vector<Anope::string> ¶ms, NewsType type, LanguageString *msgs) { Anope::string text = params.size() > 1 ? params[1] : ""; - unsigned num; if (text.empty()) this->OnSyntaxError(u, "DEL"); @@ -228,7 +227,7 @@ class NewsBase : public Command { try { - num = convertTo<unsigned>(text); + unsigned num = convertTo<unsigned>(text); if (del_newsitem(num, type)) { u->SendMessage(OperServ, msgs[MSG_DELETED], num); @@ -240,7 +239,7 @@ class NewsBase : public Command } catch (const CoreException &) { } - u->SendMessage(OperServ, msgs[MSG_DEL_NOT_FOUND], num); + u->SendMessage(OperServ, msgs[MSG_DEL_NOT_FOUND], text.c_str()); } else { |