summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-18 21:04:56 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-18 21:04:56 +0300
commit1dbf1cf1d87a38a327673b69c184ad662bd12cc4 (patch)
tree44ac0a1fa7a0202c8f67088ac07970e27be483a4 /src/gui
parent1e91bca70f5f9d6eba3e553827c1e295d483c4a5 (diff)
downloadManaVerse-1dbf1cf1d87a38a327673b69c184ad662bd12cc4.tar.gz
ManaVerse-1dbf1cf1d87a38a327673b69c184ad662bd12cc4.tar.bz2
ManaVerse-1dbf1cf1d87a38a327673b69c184ad662bd12cc4.tar.xz
ManaVerse-1dbf1cf1d87a38a327673b69c184ad662bd12cc4.zip
Add option gmTabMinimalLevel to paths.xml for show gm chat tab.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/chatwindow.cpp10
-rw-r--r--src/gui/windows/chatwindow.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 111ce4642..72b547c2a 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -2149,6 +2149,16 @@ void ChatWindow::debugMessage(const std::string &msg)
debugChatTab->chatLog(msg, ChatMsgType::BY_SERVER);
}
+void ChatWindow::showGMTab()
+{
+ if (!gmChatTab &&
+ config.getBoolValue("enableGmTab") &&
+ localPlayer->getGMLevel() >= paths.getIntValue("gmTabMinimalLevel"))
+ {
+ addSpecialChannelTab(GM_CHANNEL, false);
+ }
+}
+
#ifdef EATHENA_SUPPORT
void ChatWindow::joinRoom(const bool isJoin)
{
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index ca8250fa0..c5b5aea1a 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -323,6 +323,8 @@ class ChatWindow final : public Window,
void postConnection();
+ void showGMTab();
+
#ifdef USE_PROFILER
void logicChildren();
#endif