[Tkabber-dev] r1913 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Feb 2 21:35:11 MSK 2010


Author: sergei
Date: 2010-02-02 21:35:11 +0300 (Tue, 02 Feb 2010)
New Revision: 1913

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/chats.tcl
Log:
	* chats.tcl: Fixed calling add_message from the upper stack level.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2010-02-02 11:32:59 UTC (rev 1912)
+++ trunk/tkabber/ChangeLog	2010-02-02 18:35:11 UTC (rev 1913)
@@ -1,3 +1,7 @@
+2010-02-02  Sergei Golovan  <sgolovan at nes.ru>
+
+	* chats.tcl: Fixed calling add_message from the upper stack level.
+
 2010-02-01  Sergei Golovan  <sgolovan at nes.ru>
 
 	* chats.tcl: Added a few debug instructions.

Modified: trunk/tkabber/chats.tcl
===================================================================
--- trunk/tkabber/chats.tcl	2010-02-02 11:32:59 UTC (rev 1912)
+++ trunk/tkabber/chats.tcl	2010-02-02 18:35:11 UTC (rev 1913)
@@ -886,7 +886,11 @@
     variable chats
     variable options
 
-    debugmsg chat "ADD_MESSAGE: [lindex [info level -1] 0] $chatid $from $type $body $x"
+    if {[catch {lindex [info level -1] 0} parent]} {
+	set parent "{}"
+    }
+
+    debugmsg chat "ADD_MESSAGE: $parent $chatid $from $type $body $x"
     
     if {[is_opened $chatid]} {
 	set chatw [chat_win $chatid]



More information about the Tkabber-dev mailing list