mirror of
https://github.com/anope/anope.git
synced 2026-06-28 00:56:38 +02:00
Correct a couple expiry time checks from DoTime()
This commit is contained in:
@@ -114,7 +114,7 @@ class CommandBSSetBanExpire : public Command
|
||||
}
|
||||
|
||||
time_t t = Anope::DoTime(arg);
|
||||
if (t == -1)
|
||||
if (t < 0)
|
||||
{
|
||||
source.Reply(BAD_EXPIRY_TIME);
|
||||
return;
|
||||
|
||||
@@ -70,7 +70,7 @@ class CommandCSBan : public Command
|
||||
if (params[1][0] == '+')
|
||||
{
|
||||
ban_time = Anope::DoTime(params[1]);
|
||||
if (ban_time == -1)
|
||||
if (ban_time < 0)
|
||||
{
|
||||
source.Reply(BAD_EXPIRY_TIME);
|
||||
return;
|
||||
|
||||
@@ -75,7 +75,7 @@ class CommandCSSuspend : public Command
|
||||
else
|
||||
{
|
||||
expiry_secs = Anope::DoTime(expiry);
|
||||
if (expiry_secs == -1)
|
||||
if (expiry_secs < 0)
|
||||
{
|
||||
source.Reply(BAD_EXPIRY_TIME);
|
||||
return;
|
||||
|
||||
@@ -81,7 +81,7 @@ class CommandNSSuspend : public Command
|
||||
else
|
||||
{
|
||||
expiry_secs = Anope::DoTime(expiry);
|
||||
if (expiry_secs == -1)
|
||||
if (expiry_secs < 0)
|
||||
{
|
||||
source.Reply(BAD_EXPIRY_TIME);
|
||||
return;
|
||||
|
||||
@@ -187,7 +187,7 @@ class CommandOSForbid : public Command
|
||||
if (!expiry.empty())
|
||||
{
|
||||
expiryt = Anope::DoTime(expiry);
|
||||
if (expiryt == -1)
|
||||
if (expiryt < 0)
|
||||
{
|
||||
source.Reply(BAD_EXPIRY_TIME);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user