From 30b486f4155f69471a19422656a25c3d902aff28 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 11 Dec 2014 21:50:58 +0300 Subject: Remove "enemy" popup menu handler. --- src/gui/popups/popupmenu.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/gui/popups/popupmenu.cpp') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index f94a75ee6..b95f1d41e 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -979,18 +979,8 @@ void PopupMenu::handleLink(const std::string &link, if (actorManager) being = actorManager->findBeing(mBeingId); - if (link == "enemy" && being && + if (link == "erase" && being && being->getType() == ActorType::Player) - { - player_relations.setRelation(being->getName(), - PlayerRelation::ENEMY2); - } - else if (link == "enemy" && !mNick.empty()) - { - player_relations.setRelation(mNick, PlayerRelation::ENEMY2); - } - else if (link == "erase" && being && - being->getType() == ActorType::Player) { player_relations.setRelation(being->getName(), PlayerRelation::ERASED); being->updateName(); @@ -2613,7 +2603,7 @@ void PopupMenu::addNormalRelations() mBrowserBox->addRow("/blacklist 'NAME'", _("Black list")); // TRANSLATORS: popup menu item // TRANSLATORS: add player to enemy list - mBrowserBox->addRow("enemy", _("Set as enemy")); + mBrowserBox->addRow("/enemy 'NAME'", _("Set as enemy")); // TRANSLATORS: popup menu item // TRANSLATORS: add player to erased list mBrowserBox->addRow("erase", _("Erase")); @@ -2646,7 +2636,7 @@ void PopupMenu::addPlayerRelation(const std::string &name) mBrowserBox->addRow("/ignore 'NAME'", _("Ignore")); // TRANSLATORS: popup menu item // TRANSLATORS: add player to enemy list - mBrowserBox->addRow("enemy", _("Set as enemy")); + mBrowserBox->addRow("/enemy 'NAME'", _("Set as enemy")); // TRANSLATORS: popup menu item // TRANSLATORS: add player to erased list mBrowserBox->addRow("erase", _("Erase")); -- cgit v1.2.3-70-g09d2