[Tkabber-dev] r1696 - in trunk/tkabber: . plugins/iq

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Feb 28 17:03:56 MSK 2009


Author: sergei
Date: 2009-02-28 17:03:55 +0300 (Sat, 28 Feb 2009)
New Revision: 1696

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/disco.tcl
   trunk/tkabber/plugins/iq/version.tcl
Log:
	* disco.tcl: Allowed extra handlers to return empty lists.

	* plugins/iq/version.tcl: Don't report Tkabber version in disco#info
	  replies if user chooses not to show the version.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2009-02-27 18:45:52 UTC (rev 1695)
+++ trunk/tkabber/ChangeLog	2009-02-28 14:03:55 UTC (rev 1696)
@@ -1,3 +1,10 @@
+2009-02-28  Sergei Golovan  <sgolovan at nes.ru>
+
+	* disco.tcl: Allowed extra handlers to return empty lists.
+
+	* plugins/iq/version.tcl: Don't report Tkabber version in disco#info
+	  replies if user chooses not to show the version.
+
 2009-02-27  Sergei Golovan  <sgolovan at nes.ru>
 
 	* plugins/general/caps.tcl: Fixed erroneous emptying features list

Modified: trunk/tkabber/disco.tcl
===================================================================
--- trunk/tkabber/disco.tcl	2009-02-27 18:45:52 UTC (rev 1695)
+++ trunk/tkabber/disco.tcl	2009-02-28 14:03:55 UTC (rev 1696)
@@ -168,7 +168,10 @@
 
 	if {[info exists extra_handlers]} {
 	    foreach h $extra_handlers {
-		lappend extras [eval $h [list $xlib $from $lang]]
+		set res [eval $h [list $xlib $from $lang]]
+		if {[llength $res] > 0} {
+		    lappend extras $res
+		}
 	    }
 	}
 

Modified: trunk/tkabber/plugins/iq/version.tcl
===================================================================
--- trunk/tkabber/plugins/iq/version.tcl	2009-02-27 18:45:52 UTC (rev 1695)
+++ trunk/tkabber/plugins/iq/version.tcl	2009-02-28 14:03:55 UTC (rev 1696)
@@ -171,6 +171,10 @@
     global tkabber_version toolkit_version tcl_platform
     variable options
 
+    if {!$options(reply_iq_version)} {
+	return {}
+    }
+
     set fields \
 	[list field [list FORM_TYPE hidden "" {urn:xmpp:dataforms:softwareinfo}] \
 	      field [list software "" "" {Tkabber}] \



More information about the Tkabber-dev mailing list