From 78b46cdffd8cd0896c6d3a8815d6b651217be910 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 22 Mar 2016 22:37:24 +0100 Subject: [PATCH] Prevent FICS bell character fro printing in ICS Console XB FICS sends bell characters (ascii 7) at the start of many messages. We now strip a leading bell off the message before appending it to the text memo of the ICS Console, and ignore the message altogether if it was just bell + linefeed (to prevent each move of an observed game adding an empty line). --- dialogs.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dialogs.c b/dialogs.c index fa481d3..45acd30 100644 --- a/dialogs.c +++ b/dialogs.c @@ -2120,6 +2120,10 @@ void ConsoleWrite(char *message, int count) { if(shellUp[ChatDlg] && chatOptions[CHAT_ICS].type != Skip) { // in Xaw this is a no-op + if(*message == 7) { + message++; // remove bell + if(strcmp(message, "\n")) return; + } AppendColorized(&chatOptions[CHAT_ICS], message, count); SetInsertPos(&chatOptions[CHAT_ICS], 999999); } -- 1.7.0.4