# HG changeset patch # User Mikael Berthe # Date 1367140204 -7200 # Node ID c09fc3834c69b14f5cb2f4c96d7fafb3060d4b05 # Parent 01485f8078112fcde71be8ef16da56354cf77c37 Add option 'iq_version_hide_time' diff -r 01485f807811 -r c09fc3834c69 mcabber/mcabber/xmpp_iq.c --- a/mcabber/mcabber/xmpp_iq.c Sun Apr 28 11:01:28 2013 +0200 +++ b/mcabber/mcabber/xmpp_iq.c Sun Apr 28 11:10:04 2013 +0200 @@ -751,6 +751,11 @@ lm_message_get_from(m)); } + if (settings_opt_get_int("iq_version_hide_time")) { + send_iq_error(c, m, XMPP_ERROR_SERVICE_UNAVAILABLE); + return LM_HANDLER_RESULT_REMOVE_MESSAGE; + } + buf = g_new0(char, 512); r = lm_message_new_iq_from_query(m, LM_MESSAGE_SUB_TYPE_RESULT); @@ -801,6 +806,11 @@ lm_message_get_from(m)); } + if (settings_opt_get_int("iq_version_hide_time")) { + send_iq_error(c, m, XMPP_ERROR_SERVICE_UNAVAILABLE); + return LM_HANDLER_RESULT_REMOVE_MESSAGE; + } + buf = g_new0(char, 512); r = lm_message_new_iq_from_query(m, LM_MESSAGE_SUB_TYPE_RESULT); diff -r 01485f807811 -r c09fc3834c69 mcabber/mcabberrc.example --- a/mcabber/mcabberrc.example Sun Apr 28 11:01:28 2013 +0200 +++ b/mcabber/mcabberrc.example Sun Apr 28 11:10:04 2013 +0200 @@ -186,6 +186,10 @@ # your OS version. #set iq_version_hide_os = 0 # +# Set iq_version_hide_time to 1 if you do not want to allow people to retrieve +# your OS time. +#set iq_version_hide_time = 0 +# # Set iq_last_disable to 1 if you want to disable response to jabber:iq:last # queries (XEP-0012). Set iq_last_disable_when_notavail to 1 if you want # to disable Last Activity reports only when the not-available status is set.