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:
parent
a7dd8955f7
commit
20bd1acb60
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user