Fix crash with /ban

Sets /ban to require 3 arguments instead of 2
This commit is contained in:
MangosArentLiterature 2021-06-14 11:24:18 -05:00
parent 4c32cf86cc
commit da7aa12b90
2 changed files with 1 additions and 6 deletions

View File

@ -1937,7 +1937,7 @@ class AOClient : public QObject {
{"login", {ACLFlags.value("NONE"), 0, &AOClient::cmdLogin}},
{"getareas", {ACLFlags.value("NONE"), 0, &AOClient::cmdGetAreas}},
{"getarea", {ACLFlags.value("NONE"), 0, &AOClient::cmdGetArea}},
{"ban", {ACLFlags.value("BAN"), 2, &AOClient::cmdBan}},
{"ban", {ACLFlags.value("BAN"), 3, &AOClient::cmdBan}},
{"kick", {ACLFlags.value("KICK"), 2, &AOClient::cmdKick}},
{"changeauth", {ACLFlags.value("SUPER"), 0, &AOClient::cmdChangeAuth}},
{"rootpass", {ACLFlags.value("SUPER"), 1, &AOClient::cmdSetRootPass}},

View File

@ -30,11 +30,6 @@ void AOClient::cmdBan(int argc, QStringList argv)
DBManager::BanInfo ban;
if (argc < 3) {
sendServerMessage("Invalid syntax. Usage:\n/ban <ipid> <duration> <reason>");
return;
}
long long duration_seconds = 0;
if (argv[1] == "perma")
duration_seconds = -2;