]> git.localhorst.tv Git - blank.git/commitdiff
ignore empty chat lines
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 22 Oct 2015 10:34:12 +0000 (12:34 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 22 Oct 2015 10:34:12 +0000 (12:34 +0200)
src/client/client.cpp
src/standalone/MasterState.cpp

index 08f62112f49e36ccbc18cd376a58fd17ca8645cf..8b532633ab0cd85dc2926f2dbda72eb3ed7762e3 100644 (file)
@@ -323,7 +323,9 @@ void InteractiveState::Exit() {
 }
 
 void InteractiveState::OnLineSubmit(const string &line) {
-       master.GetClient().SendMessage(1, 0, line);
+       if (!line.empty()) {
+               master.GetClient().SendMessage(1, 0, line);
+       }
 }
 
 
index 0744a7c52260e36f221e033421957ef1b7a15d45..49ee0fbf9214967d550b526a7fd59469a9646c05 100644 (file)
@@ -196,7 +196,9 @@ void MasterState::Exit() {
 }
 
 void MasterState::OnLineSubmit(const std::string &line) {
-       hud.PostMessage(line);
+       if (!line.empty()) {
+               hud.PostMessage(line);
+       }
 }
 
 }