summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-12 12:24:21 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-12 12:24:21 +0300
commit38d5199a67d59d1ba8fc02a3771a9567d66efd7d (patch)
tree44612eafba6d690c03097862c065a6a9b00db67d /src/actions/commands.cpp
parentddb8fd5d139292ff1f862384577c723db34cf467 (diff)
downloadmv-38d5199a67d59d1ba8fc02a3771a9567d66efd7d.tar.gz
mv-38d5199a67d59d1ba8fc02a3771a9567d66efd7d.tar.bz2
mv-38d5199a67d59d1ba8fc02a3771a9567d66efd7d.tar.xz
mv-38d5199a67d59d1ba8fc02a3771a9567d66efd7d.zip
Add chat command for nuke players.
New chat command: /nuke NAME
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index c8d4f2b21..09895dc03 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -229,6 +229,21 @@ impHandler(chatEnemy)
return true;
}
+impHandler(chatNuke)
+{
+ if (!actorManager)
+ return false;
+
+ const std::string nick = getNick(event);
+ Being *const being = actorManager->findBeingByName(
+ nick, ActorType::Player);
+ if (!being)
+ return true;
+
+ actorManager->addBlock(static_cast<uint32_t>(being->getId()));
+ actorManager->destroy(being);
+}
+
impHandler0(present)
{
if (chatWindow)