summaryrefslogtreecommitdiff
path: root/src/gui/widgets/whispertab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/whispertab.cpp')
-rw-r--r--src/gui/widgets/whispertab.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp
index ba469c00..8af8d427 100644
--- a/src/gui/widgets/whispertab.cpp
+++ b/src/gui/widgets/whispertab.cpp
@@ -55,6 +55,7 @@ WhisperTab::WhisperTab(const std::string &nick) :
WhisperTab::~WhisperTab()
{
+ chatWindow->removeWhisper(mNick);
}
void WhisperTab::sendChat(std::string &msg) {
@@ -76,3 +77,11 @@ void WhisperTab::sendChat(std::string &msg) {
chatLog(strprintf(_("%s: %s"), player_node->getName().c_str(),
msg.c_str()), BY_PLAYER, false);
}
+
+void WhisperTab::handleCommand(std::string msg)
+{
+ if (msg == "close")
+ delete this;
+ else
+ ChatTab::handleCommand(msg);
+}