[Tkabber-dev] r1464 - in trunk/tkabber: . plugins/general

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Jul 3 10:42:31 MSD 2008


Author: sergei
Date: 2008-07-03 10:42:29 +0400 (Thu, 03 Jul 2008)
New Revision: 1464

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/general/caps.tcl
Log:
	* plugins/general/caps.tcl: Added forgotten node in disco#info reply
	  (thanks to Konstantin Khomoutov).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-06-18 11:29:09 UTC (rev 1463)
+++ trunk/tkabber/ChangeLog	2008-07-03 06:42:29 UTC (rev 1464)
@@ -1,3 +1,8 @@
+2008-07-03  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/general/caps.tcl: Added forgotten node in disco#info reply
+	  (thanks to Konstantin Khomoutov).
+
 2008-06-17  Sergei Golovan  <sgolovan at nes.ru>
 
 	* jabberlib/https.tcl: Fixed typo in basic authentication.

Modified: trunk/tkabber/plugins/general/caps.tcl
===================================================================
--- trunk/tkabber/plugins/general/caps.tcl	2008-06-18 11:29:09 UTC (rev 1463)
+++ trunk/tkabber/plugins/general/caps.tcl	2008-07-03 06:42:29 UTC (rev 1464)
@@ -125,9 +125,12 @@
 		}
 	    }
 	    x {
-		if {[jlib::wrapper:getattr $vars1 xmlns] == $::NS(data) && \
-			[jlib::wrapper:getattr $vars1 type] == "result"} {
-		    lappend extras [data::parse_xdata_results $children1 -hidden 1]
+		if {[string equal [jlib::wrapper:getattr $vars1 xmlns] \
+				  $::NS(data)] && \
+			[string equal [jlib::wrapper:getattr $vars1 type] \
+				      result]} {
+		    lappend extras \
+			    [data::parse_xdata_results $children1 -hidden 1]
 		}
 	    }
 	}
@@ -177,6 +180,14 @@
 		    [jlib::get_lang] \
 		    [jlib::wrapper:createtag query \
 			    -vars [list xmlns $::NS(disco_info)]]]
+    if {[string equal [lindex $res 0] result]} {
+	jlib::wrapper:splitxml [lindex $res 1] tag vars isempty chdata children
+	lappend vars node $caps_node
+	lset res 1 [jlib::wrapper:createtag $tag \
+			-vars $vars \
+			-chdata $chdata \
+			-subtags $children]
+    }
     return stop
 }
 
@@ -195,7 +206,8 @@
 	available {
 	    foreach xs $x {
 		jlib::wrapper:splitxml $xs tag vars isempty chdata children
-		if {[jlib::wrapper:getattr $vars xmlns] == $::NS(caps)} {
+		if {[string equal [jlib::wrapper:getattr $vars xmlns] \
+				  $::NS(caps)]} {
 		    set hash [jlib::wrapper:getattr $vars hash]
 		    if {[string equal $hash ""]} {
 			set hash sha-1



More information about the Tkabber-dev mailing list