Merge pull request #171 from AttorneyOnline/areakick-uninvite

uninvite users who are area-kicked
This commit is contained in:
Rose Witchaven 2021-08-01 09:44:06 -05:00 committed by GitHub
commit d26ecbd8f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,6 +220,7 @@ void AOClient::cmdArea(int argc, QStringList argv)
void AOClient::cmdAreaKick(int argc, QStringList argv)
{
AreaData* area = server->areas[current_area];
bool ok;
int idx = argv[0].toInt(&ok);
if (!ok) {
@ -236,6 +237,8 @@ void AOClient::cmdAreaKick(int argc, QStringList argv)
return;
}
client_to_kick->changeArea(0);
area->uninvite(client_to_kick->id);
sendServerMessage("Client " + argv[0] + " kicked back to area 0.");
}