Merge commit 'origin/master' into 310

Hope it works with live 3.1.2.9901 client
This commit is contained in:
tomrus88 2009-05-20 10:47:48 +04:00
commit ebb03b7b9f
32 changed files with 1709 additions and 2123 deletions

View file

@ -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)
{