From: H.G.Muller Date: Tue, 22 Mar 2016 21:37:24 +0000 (+0100) Subject: Prevent FICS bell character fro printing in ICS Console XB X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=78b46cdffd8cd0896c6d3a8815d6b651217be910;p=xboard.git 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). --- 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); }