Merge pull request #141 from AttorneyOnline/fix-ban-crash

Fix crash with /ban
This commit is contained in:
scatterflower 2021-06-21 21:45:53 -05:00 committed by GitHub
commit 86e8d4dd7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;