[Tkabber-dev] r2123 - in trunk/tkabber-plugins: . otr

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Jan 30 23:48:26 MSK 2014


Author: sergei
Date: 2014-01-30 23:48:26 +0400 (Thu, 30 Jan 2014)
New Revision: 2123

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/otr/otr.tcl
Log:
	* otr/otr.tcl:
	  Don't add fake script to the list of scripts executed on message
	  state changes.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2014-01-30 10:29:02 UTC (rev 2122)
+++ trunk/tkabber-plugins/ChangeLog	2014-01-30 19:48:26 UTC (rev 2123)
@@ -5,6 +5,8 @@
 	* otr/msgs/ru.msg: Updated Russian translation.
 
 	* otr/otr.tcl: Disable OTR contact menu if the contact is myself.
+	  Don't add fake script to the list of scripts executed on message
+	  state changes.
 
 2014-01-29  Sergei Golovan <sgolovan at nes.ru>
 

Modified: trunk/tkabber-plugins/otr/otr.tcl
===================================================================
--- trunk/tkabber-plugins/otr/otr.tcl	2014-01-30 10:29:02 UTC (rev 2122)
+++ trunk/tkabber-plugins/otr/otr.tcl	2014-01-30 19:48:26 UTC (rev 2123)
@@ -190,12 +190,12 @@
     variable options
     variable ctx
 
-    debugmsg otr "ONCE_ONLY $xlib $jid"
-
     if {[info exists ctx($xlib,$jid)]} {
 	return 1
     }
 
+    debugmsg otr "ONCE_ONLY $xlib $jid"
+
     set myjid [::xmpp::jid::removeResource [connection_jid $xlib]]
     set privkey [key::get_key $key::Keys $myjid]
     if {[llength $privkey] == 0} {
@@ -203,7 +203,7 @@
     }
 
     set ctx(msgstate,$xlib,$jid) MSGSTATE_PLAINTEXT
-    msgstate:trace {error error} $xlib $jid
+    msgstate:trace {} $xlib $jid
 
     set ctx($xlib,$jid) \
 	[::otr::new $privkey \
@@ -1141,7 +1141,9 @@
 			     [namespace current]::trace
     }
 
-    lappend trace(msgstate,$xlib,$jid) $script
+    if {$script ne {} && ($script ni $trace(msgstate,$xlib,$jid))} {
+	lappend trace(msgstate,$xlib,$jid) $script
+    }
 }
 
 proc otr::trace {name1 name2 op} {



More information about the Tkabber-dev mailing list