summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-02 12:43:53 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-02 12:43:53 +0300
commitab2c75888d63977e2a24793ce96c6adcd0eb7e0e (patch)
treede17accad6e04491a438615660c720d01dfeabe1 /src
parent945ee5304c690d11fb3b3bac683544ac0e0fb0a9 (diff)
downloadplus-ab2c75888d63977e2a24793ce96c6adcd0eb7e0e.tar.gz
plus-ab2c75888d63977e2a24793ce96c6adcd0eb7e0e.tar.bz2
plus-ab2c75888d63977e2a24793ce96c6adcd0eb7e0e.tar.xz
plus-ab2c75888d63977e2a24793ce96c6adcd0eb7e0e.zip
Add support for gm detection in online list on "new" tmw server.
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/whoisonline.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index dafbb0419..40d85f387 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -343,6 +343,7 @@ void WhoIsOnline::loadWebList()
// Tokenize and add each line separately
char *line = strtok(mMemoryBuffer, "\n");
const std::string gmText("(GM)");
+ const std::string gmText2("(gm)");
FOR_EACH (std::set<OnlinePlayer*>::iterator, itd, mOnlinePlayers)
delete *itd;
@@ -380,6 +381,15 @@ void WhoIsOnline::loadWebList()
lineStr = lineStr.substr(pos + gmText.length());
isGM = true;
}
+ else
+ {
+ pos = lineStr.find(gmText2, 0);
+ if (pos != std::string::npos)
+ {
+ lineStr = lineStr.substr(pos + gmText.length());
+ isGM = true;
+ }
+ }
trim(lineStr);
pos = lineStr.find("/", 0);