Make the .ban command remove characters from the world (instantly)

Previously the .ban command would only disconnect players.
Their character was staying ingame for multiple minutes.
This commit is contained in:
EinBaum 2018-04-08 01:33:51 +01:00 committed by Antz
parent a7dd8955f7
commit 20bd1acb60

View File

@ -2007,11 +2007,15 @@ BanReturn World::BanAccount(BanMode mode, std::string nameOrIP, uint32 duration_
}
if (WorldSession* sess = FindSession(account))
{
if (std::string(sess->GetPlayerName()) != author)
{
sess->LogoutPlayer(true);
sess->KickPlayer();
}
} while (resultAccounts->NextRow());
}
}
while (resultAccounts->NextRow());
delete resultAccounts;
return BAN_SUCCESS;