[Tkabber-dev] r796 - in trunk/tkabber: . plugins/chat

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Nov 20 23:06:42 MSK 2006


Author: sergei
Date: 2006-11-20 23:06:39 +0300 (Mon, 20 Nov 2006)
New Revision: 796

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/chat/info_commands.tcl
Log:
	* plugins/chat/info_commands.tcl: Fixed bug with asking
	  info in groupchats. When name was not specified, /version,
	  /time, /last, /vcard sent IQ to an occupant with the highest
	  priority and not to the room itself.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2006-11-19 20:10:31 UTC (rev 795)
+++ trunk/tkabber/ChangeLog	2006-11-20 20:06:39 UTC (rev 796)
@@ -1,3 +1,10 @@
+2006-11-20  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/chat/info_commands.tcl: Fixed bug with asking
+	  info in groupchats. When name was not specified, /version,
+	  /time, /last, /vcard sent IQ to an occupant with the highest
+	  priority and not to the room itself.
+
 2006-11-19  Sergei Golovan  <sgolovan at nes.ru>
 
 	* plugins/richtext/urls.tcl: Changed balloon behaviour to

Modified: trunk/tkabber/plugins/chat/info_commands.tcl
===================================================================
--- trunk/tkabber/plugins/chat/info_commands.tcl	2006-11-19 20:10:31 UTC (rev 795)
+++ trunk/tkabber/plugins/chat/info_commands.tcl	2006-11-20 20:06:39 UTC (rev 796)
@@ -83,20 +83,26 @@
     set jid [chat::get_jid $chatid]
     set jids {}
     set vcard_jids {}
-    if {[cequal $name ""]} {
-	set bare_jid [node_and_server_from_jid $jid]
-	set full_jids [::get_jids_of_user $connid $bare_jid]
-	if {[lsearch $full_jids $jid] >= 0} {
+    if {[cequal $type groupchat]} {
+	if {[cequal $name ""]} {
 	    set jids [list $jid]
-	} elseif {[lempty $full_jids]} {
-	    set jids [list $bare_jid]
 	} else {
-	    set jids $full_jids
+	    set jids [list "$jid/$name"]
 	}
-	set vcard_jids [list $bare_jid]
-    } elseif {[cequal $type groupchat]} {
-	set jids [list "$jid/$name"]
 	set vcard_jids $jids
+    } else {
+	if {[cequal $name ""]} {
+	    set bare_jid [node_and_server_from_jid $jid]
+	    set full_jids [::get_jids_of_user $connid $bare_jid]
+	    if {[lsearch $full_jids $jid] >= 0} {
+		set jids [list $jid]
+	    } elseif {[lempty $full_jids]} {
+		set jids [list $bare_jid]
+	    } else {
+		set jids $full_jids
+	    }
+	    set vcard_jids [list $bare_jid]
+	}
     }
     if {[cequal $jids {}]} {
 	lassign [roster_lookup $connid $name] jids vcard_jids
@@ -181,7 +187,7 @@
     jlib::send_iq get \
 	[jlib::wrapper:createtag query \
 	    -vars [list xmlns jabber:iq:$type]] \
-	-to [get_jid_of_user $connid $jid] \
+	-to $jid \
 	-connection $connid \
 	-command [list [namespace current]::parse_info_iq$type $chatid $jid]
 }
@@ -192,7 +198,7 @@
     jlib::send_iq get \
 	[jlib::wrapper:createtag vCard \
 	    -vars [list xmlns vcard-temp]] \
-	-to [get_jid_of_user $connid $jid] \
+	-to $jid \
 	-connection $connid \
 	-command [list [namespace current]::parse_info_vcard $chatid $jid]
 }



More information about the Tkabber-dev mailing list