summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-27 13:12:24 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-27 13:13:03 -0600
commit74f23fd3d0e1fb3be8e5419193d57d91746c887a (patch)
tree2715ae060ccd76f1b472dee3b9086e169d0e6926 /src/gui/chat.cpp
parent795cec6e276e7f5df8a25bd8306e6fd87c826502 (diff)
downloadmana-74f23fd3d0e1fb3be8e5419193d57d91746c887a.tar.gz
mana-74f23fd3d0e1fb3be8e5419193d57d91746c887a.tar.bz2
mana-74f23fd3d0e1fb3be8e5419193d57d91746c887a.tar.xz
mana-74f23fd3d0e1fb3be8e5419193d57d91746c887a.zip
Clean up chat and chat tabs some more
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index b0b15dbc..48858bf6 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -27,6 +27,7 @@
#include "gui/scrollarea.h"
#include "gui/sdlinput.h"
+#include "gui/widgets/chattab.h"
#include "gui/widgets/tabbedarea.h"
#include "gui/widgets/whispertab.h"
@@ -82,7 +83,7 @@ ChatWindow::ChatWindow(Network * network):
// run the @assert command for the player again. Convenience for GMs.
if (config.getValue(player_node->getName() + "GMassert", 0)) {
std::string cmd = "@assert";
- chatSend(cmd);
+ chatInput(cmd);
}
#endif
mRecorder = new Recorder(this);
@@ -180,7 +181,7 @@ void ChatWindow::action(const gcn::ActionEvent &event)
mCurHist = mHistory.end();
// Send the message to the server
- chatSend(message);
+ chatInput(message);
// Clear the text from the chat input
mChatInput->setText("");
@@ -258,10 +259,10 @@ void ChatWindow::removeWhisper(std::string nick)
mWhispers.erase(nick);
}
-void ChatWindow::chatSend(std::string &msg)
+void ChatWindow::chatInput(std::string &msg)
{
ChatTab *tab = getFocused();
- tab->chatSend(msg);
+ tab->chatInput(msg);
}
void ChatWindow::doPresent()
@@ -377,6 +378,7 @@ void ChatWindow::setRecordingFile(const std::string &msg)
void ChatWindow::whisper(std::string nick, std::string mes, bool own)
{
if (mes.length() == 0) return;
+
std::string playerName = player_node->getName();
std::string tempNick = nick;
@@ -395,7 +397,7 @@ void ChatWindow::whisper(std::string nick, std::string mes, bool own)
}
if (own)
- tab->chatSend(mes);
+ tab->chatInput(mes);
else
tab->chatLog(nick, mes);
}