diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-05-12 22:23:58 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-05-12 22:23:58 -0600 |
commit | 85ce3c416f6d6060c522ef6b3b5834f27f83cc5b (patch) | |
tree | c26c060c104881a8875e4141b5d42e7546864c7b /src/gui | |
parent | 94716c19748ab87a0a215f05e15ad6cac1008f07 (diff) | |
download | mana-85ce3c416f6d6060c522ef6b3b5834f27f83cc5b.tar.gz mana-85ce3c416f6d6060c522ef6b3b5834f27f83cc5b.tar.bz2 mana-85ce3c416f6d6060c522ef6b3b5834f27f83cc5b.tar.xz mana-85ce3c416f6d6060c522ef6b3b5834f27f83cc5b.zip |
Fix up handling of GM status
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/popupmenu.cpp | 21 | ||||
-rw-r--r-- | src/gui/widgets/chattab.cpp | 2 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index fdb8c5ac..e12ca822 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -118,9 +118,11 @@ void PopupMenu::showPopup(int x, int y, Being *being) if (player_node->isInParty()) mBrowserBox->addRow(strprintf(_("@@party|Invite %s to join your party@@"), name.c_str())); - /* - mBrowserBox->addRow("##3---"); - mBrowserBox->addRow(_("@@admin-kick|Kick player@@"));*/ + if (player_node->isGM()) + { + mBrowserBox->addRow("##3---"); + mBrowserBox->addRow(_("@@admin-kick|Kick player@@")); + } } break; @@ -131,13 +133,14 @@ void PopupMenu::showPopup(int x, int y, Being *being) break; case Being::MONSTER: - // Monsters can be attacked - mBrowserBox->addRow(strprintf(_("@@attack|Attack %s@@"), name.c_str())); - break; + { + // Monsters can be attacked + mBrowserBox->addRow(strprintf(_("@@attack|Attack %s@@"), name.c_str())); - /*case Being::MONSTER: - mBrowserBox->addRow(_("@@admin-kick|Kick monster@@")); - break;*/ + if (player_node->isGM()) + mBrowserBox->addRow(_("@@admin-kick|Kick monster@@")); + } + break; default: /* Other beings aren't interesting... */ diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index d55e5da8..defc06f0 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -165,7 +165,7 @@ void ChatTab::chatLog(std::string line, int own, bool ignoreRecord) #ifdef EATHENA_SUPPORT if (tmp.nick.empty() && tmp.text.substr(0, 17) == "Visible GM status") { - player_node->setGM(); + player_node->setGM(true); } #endif |