summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-02 06:08:23 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-02 06:10:19 -0600
commit128f908908b77b242b749b27879ba2a9f70a94f6 (patch)
tree613c7966a2711189b999bbed152294f3659f70f9 /src/gui/popupmenu.cpp
parented907c859026ad2133858012b4798f7c074366c4 (diff)
downloadmana-128f908908b77b242b749b27879ba2a9f70a94f6.tar.gz
mana-128f908908b77b242b749b27879ba2a9f70a94f6.tar.bz2
mana-128f908908b77b242b749b27879ba2a9f70a94f6.tar.xz
mana-128f908908b77b242b749b27879ba2a9f70a94f6.zip
Add some missing handler for eAthena
Also expand aAthena's AdminHandler
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 8bb6acbb..2b49ff30 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -35,6 +35,11 @@
#include "npc.h"
#include "player_relations.h"
+#include "net/net.h"
+#ifdef EATHENA_SUPPORT
+#include "net/ea/adminhandler.h"
+#endif
+
#include "resources/itemdb.h"
#include "resources/iteminfo.h"
@@ -108,6 +113,7 @@ void PopupMenu::showPopup(int x, int y, Being *being)
mBrowserBox->addRow("##3---");
mBrowserBox->addRow(strprintf(_("@@party-invite|Invite %s to party@@"), name.c_str()));
+ //mBrowserBox->addRow(_("@@admin-kick|Kick player@@"));
}
break;
@@ -117,6 +123,10 @@ void PopupMenu::showPopup(int x, int y, Being *being)
mBrowserBox->addRow(_("@@talk|Talk To NPC@@"));
break;
+ /*case Being::MONSTER:
+ mBrowserBox->addRow(_("@@admin-kick|Kick monster@@"));
+ break;*/
+
default:
/* Other beings aren't interesting... */
break;
@@ -290,6 +300,13 @@ void PopupMenu::handleLink(const std::string &link)
player_node->inviteToParty(dynamic_cast<Player*> (being));
}
#endif
+ else if (link == "admin-kick" &&
+ being &&
+ (being->getType() == Being::PLAYER ||
+ being->getType() == Being::MONSTER))
+ {
+ adminHandler->kick(being->getId());
+ }
// Unknown actions
else