summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
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