Mercurial > ~mikael > mcabber > hg
diff mcabber/src/fifo.c @ 1427:a8eb9aba2ed2
Add option 'fifo_hide_commands'
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 19 Feb 2008 22:24:25 +0100 |
parents | a64778f5f26b |
children | eefa0ae248d8 |
line wrap: on
line diff
--- 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 {