aboutsummaryrefslogtreecommitdiff
path: root/src/game/World.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-17 10:57:55 -0500
committermegamage <none@none>2009-05-17 10:57:55 -0500
commit3569f949d7ea0cd5c0acb6a5caf29b8990847071 (patch)
treeafcf983debdebf69e307864c3372ff53435dd350 /src/game/World.cpp
parentd2ef2c0500e86bc966b2d71bbd00acea0e924e41 (diff)
[7839] Rafactoring player targeting code in chat command and related cleanups/improvments.
* New extractOptFirstArg function for easy get 2 args in case option playe name as first arg. * New extractPlayerTarget function for get player pointer/guid/name for online/offline player base at provided name or if not provided by current seelction with error cases processing. * Property apply mute/unmute in case use different character name from loggined currently for account. * .reset commands can be used from console now * .repairitems comamnd can be used from console now but only to online player. Author: VladimirMangos --HG-- branch : trunk
Diffstat (limited to 'src/game/World.cpp')
-rw-r--r--src/game/World.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp
index 93d927c07eb..b514895a328 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -2830,31 +2830,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)
{