# HG changeset patch # User Mikael Berthe # Date 1203456265 -3600 # Node ID a8eb9aba2ed27bd129d5d374f375145b2f9da3f1 # Parent a64778f5f26b40a13f2f4cef620323df6c37a172 Add option 'fifo_hide_commands' diff -r a64778f5f26b -r a8eb9aba2ed2 mcabber/mcabberrc.example --- a/mcabber/mcabberrc.example Mon Feb 18 22:59:37 2008 +0100 +++ b/mcabber/mcabberrc.example Tue Feb 19 22:24:25 2008 +0100 @@ -215,7 +215,10 @@ # FIFO # mcabber can create a FIFO named pipe and listen to this pipe for commands. # (The FIFO support has to be compiled in.) Default: disabled. +# Set fifo_hide_commands to 1 if you don't want to see the FIFO commands +# in the log window (they will still be written to the tracelog file). #set fifo_name = ~/.mcabber/mcabber.fifo +#set fifo_hide_commands = 0 # Traces logging # If you want advanced traces, please specify a file and a level here. diff -r a64778f5f26b -r a8eb9aba2ed2 mcabber/src/fifo.c --- a/mcabber/src/fifo.c Mon Feb 18 22:59:37 2008 +0100 +++ b/mcabber/src/fifo.c Tue Feb 19 22:24:25 2008 +0100 @@ -32,6 +32,7 @@ #include "commands.h" #include "logprint.h" #include "utils.h" +#include "settings.h" #include "hbuf.h" // For HBB_BLOCKSIZE @@ -143,6 +144,7 @@ getbuf = fgets(buf, HBB_BLOCKSIZE, sfd); if (getbuf) { + guint logflag; char *eol = buf; // Strip trailing newlines @@ -153,7 +155,11 @@ while (eol > buf && *eol == '\n') *eol-- = 0; - scr_LogPrint(LPRINT_LOGNORM, "Executing FIFO command: %s", buf); + if (settings_opt_get_int("fifo_hide_commands")) + logflag = LPRINT_LOG; + else + logflag = LPRINT_LOGNORM; + scr_LogPrint(logflag, "Executing FIFO command: %s", buf); if (process_command(buf, TRUE) == 255) mcabber_set_terminate_ui(); } else {