summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-10 04:03:03 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-10 04:03:03 +0300
commit7e19d626711ecf70035b32ee99098fc7fc3419fe (patch)
tree8c7b64246c377b1d7a393aa996909d14e3008035 /src
parentff96948d57cacd580c23d892e099304476df8a2e (diff)
downloadplus-7e19d626711ecf70035b32ee99098fc7fc3419fe.tar.gz
plus-7e19d626711ecf70035b32ee99098fc7fc3419fe.tar.bz2
plus-7e19d626711ecf70035b32ee99098fc7fc3419fe.tar.xz
plus-7e19d626711ecf70035b32ee99098fc7fc3419fe.zip
Show gms in online list with green color (evol server).
Diffstat (limited to 'src')
-rw-r--r--src/being.h1
-rw-r--r--src/gui/whoisonline.cpp8
2 files changed, 6 insertions, 3 deletions
diff --git a/src/being.h b/src/being.h
index 8b3db1919..a52963746 100644
--- a/src/being.h
+++ b/src/being.h
@@ -102,6 +102,7 @@ class Being : public ActorSprite, public ConfigListener
FLAG_SHOP = 1,
FLAG_AWAY = 2,
FLAG_INACTIVE = 4,
+ FLAG_GM = 64,
FLAG_GENDER = 128,
FLAG_SPECIAL = 128 + 64
};
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index 104e4d7f1..7c620bdf1 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -720,8 +720,7 @@ void WhoIsOnline::optionChanged(const std::string &name)
void OnlinePlayer::setText(std::string color)
{
- mText = strprintf("@@%s|##%s%s ", mNick.c_str(),
- color.c_str(), mNick.c_str());
+ mText = "";
if (mStatus != 255 && actorSpriteManager)
{
@@ -753,10 +752,13 @@ void OnlinePlayer::setText(std::string color)
// TRANSLATORS: this inactive status writed in player nick
mText += _("I");
}
+ if (mStatus & Being::FLAG_GM && color == "0")
+ color = "2";
}
if (mVersion > 0)
mText += strprintf(" - %d", mVersion);
- mText += strprintf("@@");
+ mText = strprintf("@@%s|##%s%s %s@@", mNick.c_str(),
+ color.c_str(), mNick.c_str(), mText.c_str());
}