From 1dbf1cf1d87a38a327673b69c184ad662bd12cc4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 18 Jun 2015 21:04:56 +0300 Subject: Add option gmTabMinimalLevel to paths.xml for show gm chat tab. --- src/gui/windows/chatwindow.cpp | 10 ++++++++++ src/gui/windows/chatwindow.h | 2 ++ 2 files changed, 12 insertions(+) (limited to 'src/gui') 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 -- cgit v1.2.3-70-g09d2