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

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Oct 11 22:15:18 MSD 2010


Author: kostix
Date: 2010-10-11 22:15:18 +0400 (Mon, 11 Oct 2010)
New Revision: 1943

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/general/remote.tcl
Log:
Implement special processing for the unavailable presence
set remotely -- disconnect current session rather than blindly
setting the status (thanks to Gebb for bug triaging).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2010-10-11 00:49:26 UTC (rev 1942)
+++ trunk/tkabber/ChangeLog	2010-10-11 18:15:18 UTC (rev 1943)
@@ -1,3 +1,10 @@
+2010-10-11  Konstantin Khomoutov  <flatworm at users.sourceforge.net>
+
+	* plugins/general/remote.tcl: Implement special processing
+	  for the unavailable presence set remotely -- disconnect
+	  current session rather than blindly setting the status
+	  (thanks to Gebb for bug triaging).
+
 2010-10-03  Sergei Golovan  <sgolovan at nes.ru>
 
 	* msgs/uk.msg: Updated Ukrainian translation (thanks to Artem

Modified: trunk/tkabber/plugins/general/remote.tcl
===================================================================
--- trunk/tkabber/plugins/general/remote.tcl	2010-10-11 00:49:26 UTC (rev 1942)
+++ trunk/tkabber/plugins/general/remote.tcl	2010-10-11 18:15:18 UTC (rev 1943)
@@ -484,9 +484,16 @@
     upvar 0 $session state
     set lang $state(lang)
 
-    set textstatus $state(textstatus)
-    set userpriority $state(userpriority)
-    set userstatus $state(userstatus)
+    if {$state(userstatus) != "unavailable"} {
+	set textstatus $state(textstatus)
+	set userpriority $state(userpriority)
+	set userstatus $state(userstatus)
+    } else {
+	# Special processing -- disconnect current session.
+	# It is scheduled for idle processing so that the remote-command
+	# processing machinery has a chance to sent the result.
+	after idle [list ::logout $state(xlib)]
+    }
 
     return [list completed [::xmpp::xml::create note \
 				-attrs {type info} \
@@ -920,3 +927,4 @@
     }
 }
 
+# vim:ts=8:sts=4:sw=4:noet



More information about the Tkabber-dev mailing list