changeset 1498:2eaa52d314e3

Add option 'iq_hide_requests' (Suggested by dpc)
author Mikael Berthe <mikael@lilotux.net>
date Tue, 15 Jul 2008 21:37:43 +0200
parents 35020a2ed115
children 1eb27a3bb457
files mcabber/mcabberrc.example mcabber/src/jab_iq.c
diffstat 2 files changed, 18 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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);