mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
Merge commit 'origin/master' into 310
Hope it works with live 3.1.2.9901 client
This commit is contained in:
commit
ebb03b7b9f
32 changed files with 1709 additions and 2123 deletions
|
|
@ -2454,31 +2454,6 @@ void World::KickAllLess(AccountTypes sec)
|
|||
itr->second->KickPlayer();
|
||||
}
|
||||
|
||||
/// Kick (and save) the designated player
|
||||
bool World::KickPlayer(const std::string& playerName)
|
||||
{
|
||||
SessionMap::const_iterator itr;
|
||||
|
||||
// session not removed at kick and will removed in next update tick
|
||||
for (itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
|
||||
{
|
||||
if(!itr->second)
|
||||
continue;
|
||||
Player *player = itr->second->GetPlayer();
|
||||
if(!player)
|
||||
continue;
|
||||
if( player->IsInWorld() )
|
||||
{
|
||||
if (playerName == player->GetName())
|
||||
{
|
||||
itr->second->KickPlayer();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Ban an account or ban an IP address, duration will be parsed using TimeStringToSecs if it is positive, otherwise permban
|
||||
BanReturn World::BanAccount(BanMode mode, std::string nameOrIP, std::string duration, std::string reason, std::string author)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue