1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 13:43:13 +02:00

Fixed some warnings

This commit is contained in:
Adam
2010-10-11 15:37:39 -04:00
parent 0ac77d0e42
commit 717c123441
16 changed files with 64 additions and 62 deletions
+3 -3
View File
@@ -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);