summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/popupmenu.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 693ee0f70..15c5d095b 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -338,6 +338,17 @@ void PopupMenu::showPlayerPopup(int x, int y, std::string nick)
mBrowserBox->addRow(_("@@follow|Follow@@"));
mBrowserBox->addRow(_("@@imitation|Imitation@@"));
+
+ if (player_node->isInParty() && player_node->getParty())
+ {
+ PartyMember *member = player_node->getParty()->getMember(mNick);
+ if (member)
+ {
+ mBrowserBox->addRow(_("@@kick party|Kick from party@@"));
+ mBrowserBox->addRow("##3---");
+ }
+ }
+
Guild *guild2 = player_node->getGuild();
if (guild2)
{
@@ -927,6 +938,15 @@ void PopupMenu::handleLink(const std::string &link,
{
Net::getPartyHandler()->kick(being);
}
+ else if (link == "kick party" && !mNick.empty())
+ {
+ if (player_node && player_node->getParty())
+ {
+ PartyMember *member = player_node->getParty()->getMember(mNick);
+ if (member)
+ Net::getPartyHandler()->kick(mNick);
+ }
+ }
else if (link == "name" && !mNick.empty())
{
const std::string &name = mNick;