diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-02 12:43:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-02 12:43:53 +0300 |
commit | ab2c75888d63977e2a24793ce96c6adcd0eb7e0e (patch) | |
tree | de17accad6e04491a438615660c720d01dfeabe1 /src/gui/windows/whoisonline.cpp | |
parent | 945ee5304c690d11fb3b3bac683544ac0e0fb0a9 (diff) | |
download | manaverse-ab2c75888d63977e2a24793ce96c6adcd0eb7e0e.tar.gz manaverse-ab2c75888d63977e2a24793ce96c6adcd0eb7e0e.tar.bz2 manaverse-ab2c75888d63977e2a24793ce96c6adcd0eb7e0e.tar.xz manaverse-ab2c75888d63977e2a24793ce96c6adcd0eb7e0e.zip |
Add support for gm detection in online list on "new" tmw server.
Diffstat (limited to 'src/gui/windows/whoisonline.cpp')
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 10 |
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); |