summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-12 21:06:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-12 21:06:58 +0300
commite295dea5cd695b716d2617b8949da992ebdab71c (patch)
treeec941d413e78de24f84ef76525c72ff3ea2d1d0a /src
parent645553c783c2cacb1ed140aa53792c35c3b971d2 (diff)
downloadplus-e295dea5cd695b716d2617b8949da992ebdab71c.tar.gz
plus-e295dea5cd695b716d2617b8949da992ebdab71c.tar.bz2
plus-e295dea5cd695b716d2617b8949da992ebdab71c.tar.xz
plus-e295dea5cd695b716d2617b8949da992ebdab71c.zip
Fix player relation manu actions.
Diffstat (limited to 'src')
-rw-r--r--src/actions/commands.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 00c8b9a5c..eb10e8a77 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -101,19 +101,19 @@ static void changeRelation(const InputEvent &event,
const PlayerRelation::Relation relation,
const std::string &relationText)
{
- if (!event.tab)
- return;
-
std::string args = getNick(event);
if (args.empty())
return;
if (player_relations.getRelation(args) == relation)
{
- // TRANSLATORS: change relation
- event.tab->chatLog(strprintf(_("Player already %s!"),
- relationText.c_str()), ChatMsgType::BY_SERVER);
- return;
+ if (event.tab)
+ {
+ // TRANSLATORS: change relation
+ event.tab->chatLog(strprintf(_("Player already %s!"),
+ relationText.c_str()), ChatMsgType::BY_SERVER);
+ return;
+ }
}
else
{