summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 491542a8..0e75bda3 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -22,6 +22,8 @@
#include "chat.h"
#include "actorspritemanager.h"
+#include "channel.h"
+#include "channelmanager.h"
#include "configuration.h"
#include "localplayer.h"
#include "party.h"
@@ -31,6 +33,7 @@
#include "gui/setup.h"
#include "gui/sdlinput.h"
+#include "gui/widgets/channeltab.h"
#include "gui/widgets/chattab.h"
#include "gui/widgets/itemlinkhandler.h"
#include "gui/widgets/scrollarea.h"
@@ -399,7 +402,24 @@ void ChatWindow::event(Event::Channel channel, const Event &event)
}
else if (event.getType() == Event::Announcement)
{
+ // Show on local tab
localChatTab->chatLog(event.getString("message"), BY_GM);
+ // Spread over channels
+ for (std::list<Channel*>::iterator
+ it = channelManager->mChannels.begin(),
+ it_end = channelManager->mChannels.end();
+ it != it_end; ++it)
+ {
+ if (*it)
+ (*it)->getTab()->chatLog(event.getString("message"), BY_GM);
+ }
+ // Spread over whispers
+ for (TabMap::const_iterator it = mWhispers.begin(),
+ it_end = mWhispers.end(); it != it_end; ++it)
+ {
+ if (it->second)
+ it->second->chatLog(event.getString("message"), BY_GM);
+ }
}
else if (event.getType() == Event::Being)
{