[Tkabber-dev] r2097 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Jan 26 11:55:41 MSK 2014


Author: sergei
Date: 2014-01-26 11:55:41 +0400 (Sun, 26 Jan 2014)
New Revision: 2097

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/hooks.tcl
Log:
	* hooks.tcl: Initialize flags variable when hook is created.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2014-01-26 07:43:00 UTC (rev 2096)
+++ trunk/tkabber/ChangeLog	2014-01-26 07:55:41 UTC (rev 2097)
@@ -11,6 +11,8 @@
 	  in this hooks to disable logging. Use send flag in
 	  rewrite_outgoing_message_hook to disable actual sending.
 
+	* hooks.tcl: Initialize flags variable when hook is created.
+
 2014-01-22  Sergei Golovan  <sgolovan at nes.ru>
 
 	* gpgme.tcl, chats.tcl: Adjusted priority of rewrite_message_hook

Modified: trunk/tkabber/hooks.tcl
===================================================================
--- trunk/tkabber/hooks.tcl	2014-01-26 07:43:00 UTC (rev 2096)
+++ trunk/tkabber/hooks.tcl	2014-01-26 07:55:41 UTC (rev 2097)
@@ -3,8 +3,13 @@
 namespace eval hook {}
 
 proc hook::add {hook func {seq 50}} {
+    variable F
     variable $hook
 
+    if {![info exists F(flags,$hook)]} {
+	set F(flags,$hook) {}
+    }
+
     lappend $hook [list $func $seq]
     set $hook [lsort -real -index 1 [lsort -unique [set $hook]]]
 }



More information about the Tkabber-dev mailing list