summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-26 22:28:59 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-26 22:28:59 +0200
commit037248d338291529e0c044a80ca8345abe05dd2b (patch)
tree21de81615c2a7d369d301a3f437f24c14cd2a586
parent96150f1aeacf55d311c41ffe12d9e754b1cda001 (diff)
downloadmv-037248d338291529e0c044a80ca8345abe05dd2b.tar.gz
mv-037248d338291529e0c044a80ca8345abe05dd2b.tar.bz2
mv-037248d338291529e0c044a80ca8345abe05dd2b.tar.xz
mv-037248d338291529e0c044a80ca8345abe05dd2b.zip
Allow kick player from party from context menu if player not here.
-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;