From 504811a32cef9a5764bc2b1aa6bba18f1be7c8a1 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 21 Dec 2020 16:04:04 +0100 Subject: [PATCH] Don't send an empty message Signed-off-by: Yohann D'ANELLO --- squinnondation/squinnondation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/squinnondation/squinnondation.py b/squinnondation/squinnondation.py index c46acff..15b3300 100644 --- a/squinnondation/squinnondation.py +++ b/squinnondation/squinnondation.py @@ -72,6 +72,9 @@ class Squinnondation: squirrel.refresh_history() squirrel.refresh_input() msg = screen.getstr(curses.LINES - 1, 3 + len(squirrel.nickname)).decode("UTF-8") + if not msg: + continue + msg = f"<{squirrel.nickname}> {msg}" squirrel.history.append(msg)