summaryrefslogtreecommitdiff
path: root/src/gui/widgets/chattab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/chattab.cpp')
-rw-r--r--src/gui/widgets/chattab.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index 0742e0ae2..fd336e116 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -55,7 +55,8 @@ ChatTab::ChatTab(const Widget2 *const widget, const std::string &name) :
mScrollArea(new ScrollArea(mTextOutput, false)),
mAllowHightlight(true),
mRemoveNames(false),
- mNoAway(false)
+ mNoAway(false),
+ mShowOnline(false)
{
setCaption(name);
@@ -506,3 +507,15 @@ void ChatTab::playNewMessageSound()
{
sound.playGuiSound(SOUND_WHISPER);
}
+
+void ChatTab::showOnline(const std::string &nick,
+ const bool isOnline)
+{
+ if (!mShowOnline)
+ return;
+
+ if (isOnline)
+ chatLog(strprintf(_("%s is now Online."), nick.c_str()));
+ else
+ chatLog(strprintf(_("%s is now Offline."), nick.c_str()));
+}