From 647c1a8b8b02b737b11b1e08af86ecc84f649a81 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Aug 2014 18:48:18 +0300 Subject: Move chat command /undress into actions. --- src/actions/actions.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/actions/actions.cpp') diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 3a8aeaa4a..6c5f365af 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -70,6 +70,7 @@ #include "render/graphics.h" +#include "net/beinghandler.h" #include "net/chathandler.h" #include "net/gamehandler.h" #include "net/ipc.h" @@ -681,4 +682,17 @@ impHandler0(disconnect) return true; } +impHandler(undress) +{ + if (!actorManager || !localPlayer) + return false; + + Being *target = localPlayer->getTarget(); + if (!target) + target = actorManager->findNearestByName(event.args); + if (target) + Net::getBeingHandler()->undress(target); + return true; +} + } // namespace Actions -- cgit v1.2.3-60-g2f50