From f21a21b285c5b54e3abcc757c6715d22520dd190 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Thu, 22 Oct 2015 12:34:12 +0200 Subject: [PATCH 1/1] ignore empty chat lines --- src/client/client.cpp | 4 +++- src/standalone/MasterState.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/client/client.cpp b/src/client/client.cpp index 08f6211..8b53263 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -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); + } } diff --git a/src/standalone/MasterState.cpp b/src/standalone/MasterState.cpp index 0744a7c..49ee0fb 100644 --- a/src/standalone/MasterState.cpp +++ b/src/standalone/MasterState.cpp @@ -196,7 +196,9 @@ void MasterState::Exit() { } void MasterState::OnLineSubmit(const std::string &line) { - hud.PostMessage(line); + if (!line.empty()) { + hud.PostMessage(line); + } } } -- 2.39.2