summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-16 16:17:30 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-16 16:17:30 +0300
commit55b4f417e104d92a283ba166f310ca15fedd1f0f (patch)
tree9c36b40e8655fe7dfdee22bcb530facd486a7a5f /src/gui
parent748158ac92c1a88bd46fc2a3b49c490fc0dd1171 (diff)
downloadmanaverse-55b4f417e104d92a283ba166f310ca15fedd1f0f.tar.gz
manaverse-55b4f417e104d92a283ba166f310ca15fedd1f0f.tar.bz2
manaverse-55b4f417e104d92a283ba166f310ca15fedd1f0f.tar.xz
manaverse-55b4f417e104d92a283ba166f310ca15fedd1f0f.zip
Add gm commands into chat whisper context menu.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/popupmenu.cpp90
1 files changed, 46 insertions, 44 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index a7c493b8e..45add13e5 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -819,6 +819,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
const Being* const being = actorManager->findBeingByName(
name, ActorType::Player);
+ addGmCommands();
if (being)
{
mBeingId = being->getId();
@@ -890,6 +891,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
}
else
{
+ mBeingId = BeingId_zero;
mNick = name;
mType = ActorType::Player;
addPlayerRelation(name);
@@ -2654,51 +2656,51 @@ void PopupMenu::showGMPopup()
// TRANSLATORS: popup menu item
// TRANSLATORS: kick player
mBrowserBox->addRow("/kick :'BEINGID'", _("Kick"));
- }
- if (serverFeatures->haveMute())
- {
- mBrowserBox->addRow("##3---");
- mBrowserBox->addRow("mute_+1",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: mute player
- strprintf(_("Mute %d"), 1).c_str());
- mBrowserBox->addRow("mute_+5",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: mute player
- strprintf(_("Mute %d"), 5).c_str());
- mBrowserBox->addRow("mute_+10",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: mute player
- strprintf(_("Mute %d"), 10).c_str());
- mBrowserBox->addRow("mute_+15",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: mute player
- strprintf(_("Mute %d"), 15).c_str());
- mBrowserBox->addRow("mute_+30",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: mute player
- strprintf(_("Mute %d"), 30).c_str());
+ if (serverFeatures->haveMute())
+ {
+ mBrowserBox->addRow("##3---");
+ mBrowserBox->addRow("mute_+1",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: mute player
+ strprintf(_("Mute %d"), 1).c_str());
+ mBrowserBox->addRow("mute_+5",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: mute player
+ strprintf(_("Mute %d"), 5).c_str());
+ mBrowserBox->addRow("mute_+10",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: mute player
+ strprintf(_("Mute %d"), 10).c_str());
+ mBrowserBox->addRow("mute_+15",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: mute player
+ strprintf(_("Mute %d"), 15).c_str());
+ mBrowserBox->addRow("mute_+30",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: mute player
+ strprintf(_("Mute %d"), 30).c_str());
- mBrowserBox->addRow("mute_-1",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: mute player
- strprintf(_("Unmute %d"), 1).c_str());
- mBrowserBox->addRow("mute_-5",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: mute player
- strprintf(_("Unmute %d"), 5).c_str());
- mBrowserBox->addRow("mute_-10",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: mute player
- strprintf(_("Unmute %d"), 10).c_str());
- mBrowserBox->addRow("mute_-15",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: mute player
- strprintf(_("Unmute %d"), 15).c_str());
- mBrowserBox->addRow("mute_-30",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: mute player
- strprintf(_("Unmute %d"), 30).c_str());
+ mBrowserBox->addRow("mute_-1",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: mute player
+ strprintf(_("Unmute %d"), 1).c_str());
+ mBrowserBox->addRow("mute_-5",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: mute player
+ strprintf(_("Unmute %d"), 5).c_str());
+ mBrowserBox->addRow("mute_-10",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: mute player
+ strprintf(_("Unmute %d"), 10).c_str());
+ mBrowserBox->addRow("mute_-15",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: mute player
+ strprintf(_("Unmute %d"), 15).c_str());
+ mBrowserBox->addRow("mute_-30",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: mute player
+ strprintf(_("Unmute %d"), 30).c_str());
+ }
}
}