diff options
author | Adam <Adam@anope.org> | 2010-10-11 15:37:39 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-10-11 15:37:39 -0400 |
commit | 717c123441bb47a4fab859e8fb3ec8c6ac5b7223 (patch) | |
tree | 3be1a3376caafdd8ca9bf75d7acf98020cf94a7c /modules/core/ms_set.cpp | |
parent | 0ac77d0e42952765d2899565427ce92679142c17 (diff) |
Fixed some warnings
Diffstat (limited to 'modules/core/ms_set.cpp')
-rw-r--r-- | modules/core/ms_set.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/core/ms_set.cpp b/modules/core/ms_set.cpp index a49e849f1..492111389 100644 --- a/modules/core/ms_set.cpp +++ b/modules/core/ms_set.cpp @@ -134,7 +134,7 @@ class CommandMSSet : public Command else nc->UnsetFlag(NI_MEMO_HARDMAX); } - limit = p1.is_number_only() ? convertTo<int32>(p1) : -1; + limit = p1.is_pos_number_only() ? convertTo<int32>(p1) : -1; if (limit < 0 || limit > 32767) { u->SendMessage(MemoServ, MEMO_SET_LIMIT_OVERFLOW, 32767); @@ -160,10 +160,10 @@ class CommandMSSet : public Command u->SendMessage(MemoServ, MEMO_SET_YOUR_LIMIT_FORBIDDEN); return MOD_CONT; } - limit = p1.is_number_only() ? convertTo<int32>(p1) : -1; + limit = p1.is_pos_number_only() ? convertTo<int32>(p1) : -1; /* The first character is a digit, but we could still go negative * from overflow... watch out! */ - if (limit < 0 || (Config->MSMaxMemos > 0 && limit > Config->MSMaxMemos)) + if (limit < 0 || (Config->MSMaxMemos > 0 && convertTo<unsigned>(limit) > Config->MSMaxMemos)) { if (!chan.empty()) u->SendMessage(MemoServ, MEMO_SET_LIMIT_TOO_HIGH, chan.c_str(), Config->MSMaxMemos); |