summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being/localplayer.cpp3
-rw-r--r--src/gui/windows/chatwindow.cpp6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index a6636ba77..17ee2d823 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -48,6 +48,7 @@
#include "input/keyboardconfig.h"
+#include "gui/chatconsts.h"
#include "gui/gui.h"
#include "gui/popupmanager.h"
@@ -408,7 +409,7 @@ void LocalPlayer::setGMLevel(const int level)
{
chatWindow->loadGMCommands();
if (!gmChatTab && config.getBoolValue("enableGmTab"))
- gmChatTab = new GmTab(chatWindow);
+ chatWindow->addSpecialChannelTab(GM_CHANNEL, false);
}
}
}
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 7c32a6298..4324acca5 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -1205,13 +1205,17 @@ ChatTab *ChatWindow::addSpecialChannelTab(const std::string &name,
{
tradeChatTab = new TradeTab(chatWindow);
tradeChatTab->setAllowHighlight(false);
+ chatHandler->joinChannel(tradeChatTab->getChannelName());
}
ret = tradeChatTab;
}
else if (name == GM_CHANNEL)
{
if (!gmChatTab)
+ {
gmChatTab = new GmTab(chatWindow);
+ chatHandler->joinChannel(gmChatTab->getChannelName());
+ }
ret = gmChatTab;
}
if (switchTo)
@@ -1279,6 +1283,8 @@ void ChatWindow::postConnection()
return;
chatHandler->joinChannel(tab->getChannelName());
}
+ if (langChatTab)
+ chatHandler->joinChannel(langChatTab->getChannelName());
}
#define changeColor(fun) \