summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-29 09:27:45 -0700
committerIra Rice <irarice@gmail.com>2009-01-29 09:27:45 -0700
commit59cfd8a03f22f43539d47a55087ad5768e7a330f (patch)
tree58685939b4f317d0baa45c2826db387d4389693c
parent0187f66a01fb38f6683f528770a69652af90b35e (diff)
downloadmana-client-59cfd8a03f22f43539d47a55087ad5768e7a330f.tar.gz
mana-client-59cfd8a03f22f43539d47a55087ad5768e7a330f.tar.bz2
mana-client-59cfd8a03f22f43539d47a55087ad5768e7a330f.tar.xz
mana-client-59cfd8a03f22f43539d47a55087ad5768e7a330f.zip
Don't send empty chats (long lines of empty spaces).
Signed-off-by: Ira Rice <irarice@gmail.com>
-rw-r--r--src/gui/chat.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index d790d292..3a22581f 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -341,6 +341,11 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg)
* require server handling by proper packet. Probably
* those if elses should be replaced by protocol calls */
+ trim(msg);
+
+ if (msg.compare("") == 0)
+ return;
+
// Send party message
if (msg.at(0) == mPartyPrefix)
{