[Tkabber-dev] r1545 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Oct 18 12:07:16 MSD 2008


Author: sergei
Date: 2008-10-18 12:07:16 +0400 (Sat, 18 Oct 2008)
New Revision: 1545

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/chats.tcl
   trunk/tkabber/muc.tcl
   trunk/tkabber/presence.tcl
Log:
	* presence.tcl: Unset error property if an available or subscription
	  presence is received.

	* chats.tcl, muc.tcl: Fixed processing errors when joining room and
	  when an occupant's unavaiable presence is received.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-10-18 07:03:29 UTC (rev 1544)
+++ trunk/tkabber/ChangeLog	2008-10-18 08:07:16 UTC (rev 1545)
@@ -12,6 +12,12 @@
 
 	* muc.tcl: Fixed changing nicknames.
 
+	* presence.tcl: Unset error property if an available or subscription
+	  presence is received.
+
+	* chats.tcl, muc.tcl: Fixed processing errors when joining room and
+	  when an occupant's unavaiable presence is received.
+
 2008-10-17  Sergei Golovan  <sgolovan at nes.ru>
 
 	* plugins/general/sound.tcl: Cleared sound external program option

Modified: trunk/tkabber/chats.tcl
===================================================================
--- trunk/tkabber/chats.tcl	2008-10-18 07:03:29 UTC (rev 1544)
+++ trunk/tkabber/chats.tcl	2008-10-18 08:07:16 UTC (rev 1545)
@@ -1004,10 +1004,10 @@
 	    if {[cequal $status unavailable] || [cequal $status error]} {
 		if {$status == "error" && [is_our_jid $chatid $jid]} {
 		    add_message $chatid $group error \
-			[format [::msgcat::mc "Error %s"] \
-			     [get_jid_presence_info status $xlib $jid]] {}
-			set chats(status,$chatid) disconnected
-			client:presence $xlib $group unavailable "" {}
+			[::xmpp::stanzaerror::message \
+				[get_jid_presence_info error $xlib $jid]] {}
+		    set chats(status,$chatid) disconnected
+		    client:presence $xlib $group unavailable "" {}
 		}
 		if {$status == "unavailable" && [is_our_jid $chatid $jid]} {
 		    if {[muc::is_compatible $group] || \

Modified: trunk/tkabber/muc.tcl
===================================================================
--- trunk/tkabber/muc.tcl	2008-10-18 07:03:29 UTC (rev 1544)
+++ trunk/tkabber/muc.tcl	2008-10-18 08:07:16 UTC (rev 1545)
@@ -1203,7 +1203,12 @@
 	    (![info exists ignore_unavailable] || \
 		 $ignore_unavailable != $nick)} {
 	set xlib [chat::get_xlib $chatid]
-	set status [get_jid_presence_info status $xlib $group/$nick]
+	set error [get_jid_presence_info error $xlib $group/$nick]
+	if {$error != ""} {
+	    set status [::xmpp::stanzaerror::message $error]
+	} else {
+	    set status [get_jid_presence_info status $xlib $group/$nick]
+	}
 	if {$status != ""} {
 	    set end ": $status"
 	} else {

Modified: trunk/tkabber/presence.tcl
===================================================================
--- trunk/tkabber/presence.tcl	2008-10-18 07:03:29 UTC (rev 1544)
+++ trunk/tkabber/presence.tcl	2008-10-18 08:07:16 UTC (rev 1545)
@@ -72,6 +72,7 @@
 	    set presence(priority,$xlib,$from) 0
 	    set presence(show,$xlib,$from)     available
 	    set presence(x,$xlib,$from)        $x
+	    catch { unset presence(error,$xlib,$from) }
 	    
 	    foreach {attr val} $args {
 		switch -- $attr {



More information about the Tkabber-dev mailing list