summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-15 13:39:01 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-15 13:39:01 -0600
commit72278cfec112e06b50ba06185fb59a2ce390d955 (patch)
tree306c21014780a12ed5a16bc85d57ada223055bad /src/gui/chat.cpp
parente8a1b2386bb2c28cfce0eb28d7e7067d51bb6701 (diff)
downloadmana-client-72278cfec112e06b50ba06185fb59a2ce390d955.tar.gz
mana-client-72278cfec112e06b50ba06185fb59a2ce390d955.tar.bz2
mana-client-72278cfec112e06b50ba06185fb59a2ce390d955.tar.xz
mana-client-72278cfec112e06b50ba06185fb59a2ce390d955.zip
Add a config option to always use whipser tabs
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 30511ef9..46611b78 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -426,6 +426,11 @@ void ChatWindow::whisper(std::string nick, std::string mes, bool own)
ChatTab *tab = mWhispers[tempNick];
+ if (!tab && config.getValue("whispertab", false))
+ {
+ tab = addWhisperTab(nick);
+ }
+
if (tab)
{
if (own)
@@ -447,7 +452,7 @@ void ChatWindow::whisper(std::string nick, std::string mes, bool own)
}
}
-bool ChatWindow::addWhisperTab(std::string nick)
+ChatTab *ChatWindow::addWhisperTab(std::string nick)
{
std::string playerName = player_node->getName();
std::string tempNick = nick;
@@ -456,9 +461,7 @@ bool ChatWindow::addWhisperTab(std::string nick)
toLower(tempNick);
if (mWhispers[tempNick] || tempNick.compare(playerName) == 0)
- return false;
-
- mWhispers[tempNick] = new WhisperTab(nick);
+ return NULL;
- return true;
+ return mWhispers[tempNick] = new WhisperTab(nick);
}