# HG changeset patch # User Mikael Berthe # Date 1216150663 -7200 # Node ID 2eaa52d314e3ac20d4855c52d394f08a4ea36512 # Parent 35020a2ed115b11ce3d3e038c1548ef7fe3c1f73 Add option 'iq_hide_requests' (Suggested by dpc) diff -r 35020a2ed115 -r 2eaa52d314e3 mcabber/mcabberrc.example --- a/mcabber/mcabberrc.example Mon Jun 30 23:13:50 2008 +0200 +++ b/mcabber/mcabberrc.example Tue Jul 15 21:37:43 2008 +0200 @@ -172,6 +172,10 @@ # (Default is 0 for both options) #set iq_last_disable = 0 #set iq_last_disable_when_notavail = 1 +# +# Set iq_hide_requests to 1 if you don't want received IQ requests to be +# displayed in the status window (default: 0). +#set iq_hide_requests = 1 # Beep # Set beep_on_message to 1 if you want mcabber to beep when receiving diff -r 35020a2ed115 -r 2eaa52d314e3 mcabber/src/jab_iq.c --- a/mcabber/src/jab_iq.c Mon Jun 30 23:13:50 2008 +0200 +++ b/mcabber/src/jab_iq.c Tue Jul 15 21:37:43 2008 +0200 @@ -1480,8 +1480,10 @@ xmlnode myquery; char *seconds; - scr_LogPrint(LPRINT_LOGNORM, "Received an IQ last time request from <%s>", - from); + if (!settings_opt_get_int("iq_hide_requests")) { + scr_LogPrint(LPRINT_LOGNORM, "Received an IQ last time request from <%s>", + from); + } x = jutil_iqnew(JPACKET__RESULT, NS_LAST); xmlnode_put_attrib(x, "id", id); @@ -1511,8 +1513,10 @@ char *os = NULL; char *ver = mcabber_version(); - scr_LogPrint(LPRINT_LOGNORM, "Received an IQ version request from <%s>", - from); + if (!settings_opt_get_int("iq_hide_requests")) { + scr_LogPrint(LPRINT_LOGNORM, "Received an IQ version request from <%s>", + from); + } if (!settings_opt_get_int("iq_version_hide_os")) { struct utsname osinfo; @@ -1550,7 +1554,9 @@ time(&now_t); - scr_LogPrint(LPRINT_LOGNORM, "Received an IQ time request from <%s>", from); + if (!settings_opt_get_int("iq_hide_requests")) { + scr_LogPrint(LPRINT_LOGNORM, "Received an IQ time request from <%s>", from); + } buf = g_new0(char, 512); @@ -1597,7 +1603,9 @@ time(&now_t); - scr_LogPrint(LPRINT_LOGNORM, "Received an IQ time request from <%s>", from); + if (!settings_opt_get_int("iq_hide_requests")) { + scr_LogPrint(LPRINT_LOGNORM, "Received an IQ time request from <%s>", from); + } buf = g_new0(char, 512);