summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-09 01:09:41 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-09 01:09:41 +0300
commit5804dfb0eb162fcd73e6ae7bac9232bb44dbf398 (patch)
tree1d9ce6ba9efb37c37b539b5e03f3412129b8f95e /src
parentd127d696a5c15fb53fb9a088a7193f6f40595b53 (diff)
downloadplus-5804dfb0eb162fcd73e6ae7bac9232bb44dbf398.tar.gz
plus-5804dfb0eb162fcd73e6ae7bac9232bb44dbf398.tar.bz2
plus-5804dfb0eb162fcd73e6ae7bac9232bb44dbf398.tar.xz
plus-5804dfb0eb162fcd73e6ae7bac9232bb44dbf398.zip
Highlight gms in online list with color.
Diffstat (limited to 'src')
-rw-r--r--src/gui/whoisonline.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index 503ce3758..ec4691fca 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -375,9 +375,13 @@ void WhoIsOnline::loadWebList()
}
trim(nick);
+ bool isGM(false);
pos = lineStr.find(gmText, 0);
if (pos != std::string::npos)
+ {
lineStr = lineStr.substr(pos + gmText.length());
+ isGM = true;
+ }
trim(lineStr);
pos = lineStr.find("/", 0);
@@ -421,7 +425,10 @@ void WhoIsOnline::loadWebList()
{
case PlayerRelation::NEUTRAL:
default:
- player->setText("0");
+ if (isGM)
+ player->setText("G");
+ else
+ player->setText("0");
neutral.push_back(player);
break;
@@ -769,8 +776,9 @@ 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";
+ color = "G";
}
if (mVersion > 0)