diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-26 22:28:59 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-26 22:28:59 +0200 |
commit | 037248d338291529e0c044a80ca8345abe05dd2b (patch) | |
tree | 21de81615c2a7d369d301a3f437f24c14cd2a586 /src/gui/popupmenu.cpp | |
parent | 96150f1aeacf55d311c41ffe12d9e754b1cda001 (diff) | |
download | manaverse-037248d338291529e0c044a80ca8345abe05dd2b.tar.gz manaverse-037248d338291529e0c044a80ca8345abe05dd2b.tar.bz2 manaverse-037248d338291529e0c044a80ca8345abe05dd2b.tar.xz manaverse-037248d338291529e0c044a80ca8345abe05dd2b.zip |
Allow kick player from party from context menu if player not here.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 20 |
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; |