summaryrefslogtreecommitdiff
path: root/modules/core/os_session.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-10-11 15:37:39 -0400
committerAdam <Adam@anope.org>2010-10-11 15:37:39 -0400
commit717c123441bb47a4fab859e8fb3ec8c6ac5b7223 (patch)
tree3be1a3376caafdd8ca9bf75d7acf98020cf94a7c /modules/core/os_session.cpp
parent0ac77d0e42952765d2899565427ce92679142c17 (diff)
Fixed some warnings
Diffstat (limited to 'modules/core/os_session.cpp')
-rw-r--r--modules/core/os_session.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/core/os_session.cpp b/modules/core/os_session.cpp
index e88e9a856..51f98b951 100644
--- a/modules/core/os_session.cpp
+++ b/modules/core/os_session.cpp
@@ -123,10 +123,11 @@ class CommandOSSession : public Command
private:
CommandReturn DoList(User *u, const std::vector<Anope::string> &params)
{
- int mincount;
Anope::string param = params[1];
- if ((mincount = (param.is_number_only() ? convertTo<int>(param) : 0)) <= 1)
+ unsigned mincount = param.is_pos_number_only() ? convertTo<unsigned>(param) : 0;
+
+ if (mincount <= 1)
u->SendMessage(OperServ, OPER_SESSION_INVALID_THRESHOLD);
else
{
@@ -318,8 +319,8 @@ class CommandOSException : public Command
return MOD_CONT;
}
- n1 = n1str.is_number_only() ? convertTo<int>(n1str) - 1 : -1;
- n2 = n2str.is_number_only() ? convertTo<int>(n2str) - 1 : -1;
+ n1 = n1str.is_pos_number_only() ? convertTo<int>(n1str) - 1 : -1;
+ n2 = n2str.is_pos_number_only() ? convertTo<int>(n2str) - 1 : -1;
if (n1 >= 0 && n1 < exceptions.size() && n2 >= 0 && n2 < exceptions.size() && n1 != n2)
{