Fix order of operations issues in worldshutdown command (#2029)

This commit is contained in:
Michael Cook (mackal) 2022-03-04 12:24:13 -05:00 committed by GitHub
parent cc2ef11158
commit 58cde58b45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,8 +12,8 @@ void command_worldshutdown(Client *c, const Seperator *sep)
if (
sep->IsNumber(1) &&
sep->IsNumber(2) &&
(time = std::stoi(sep->arg[1]) > 0) &&
(interval = std::stoi(sep->arg[2]) > 0)
((time = std::stoi(sep->arg[1])) > 0) &&
((interval = std::stoi(sep->arg[2])) > 0)
) {
int time_minutes = (time / 60);
quest_manager.WorldWideMessage(