[Tkabber-dev] r739 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Sep 30 20:45:29 MSD 2006


Author: sergei
Date: 2006-09-30 20:45:24 +0400 (Sat, 30 Sep 2006)
New Revision: 739

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/roster.tcl
Log:
	* roster.tcl: Strictened check whether removing JID is our
	  server JID (to make sure that if it's in the roster then
	  removing it doesn't unregister account).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2006-09-30 14:24:09 UTC (rev 738)
+++ trunk/tkabber/ChangeLog	2006-09-30 16:45:24 UTC (rev 739)
@@ -14,6 +14,10 @@
 	  plugins/unix/wmdock.tcl, utils.tcl, chats.tcl: Switched to
 	  balloon::setup when defining balloons.
 
+	* roster.tcl: Strictened check whether removing JID is our
+	  server JID (to make sure that if it's in the roster then
+	  removing it doesn't unregister account).
+
 2006-09-29  Sergei Golovan  <sgolovan at nes.ru>
 
 	* custom.tcl: Added new variable type 'options'. GUI for this

Modified: trunk/tkabber/roster.tcl
===================================================================
--- trunk/tkabber/roster.tcl	2006-09-30 14:24:09 UTC (rev 738)
+++ trunk/tkabber/roster.tcl	2006-09-30 16:45:24 UTC (rev 739)
@@ -483,10 +483,10 @@
 
     jlib::send_iq set \
 	[jlib::wrapper:createtag query \
-	     -vars {xmlns jabber:iq:roster} \
+	     -vars [list xmlns $::NS(roster)] \
 	     -subtags [list [jlib::wrapper:createtag item \
 				 -vars [list jid $jid \
-					    subscription remove]]]] \
+					     subscription remove]]]] \
 	-connection $connid
 	
     jlib::send_presence -to $jid -type unsubscribe -connection $connid
@@ -494,12 +494,15 @@
 
     lassign [get_category_and_subtype $connid $jid] category subtype
 
-    if {(($category == "service") || ($category == "server") || ($category == "gateway")) && \
-	    ($jid != [jlib::connection_server $connid])} {
+    if {(($category == "service") || \
+	 ($category == "server") || \
+	 ($category == "gateway")) && \
+	[string compare -nocase [node_and_server_from_jid $jid] \
+				[jlib::connection_server $connid]]} {
 	jlib::send_iq set \
 	    [jlib::wrapper:createtag query \
-		-vars {xmlns jabber:iq:register} \
-		-subtags [list [jlib::wrapper:createtag remove]]] \
+		 -vars [list xmlns $::NS(register)] \
+		 -subtags [list [jlib::wrapper:createtag remove]]] \
 	    -to $jid \
 	    -connection $connid
     }



More information about the Tkabber-dev mailing list