[Tkabber-dev] r1566 - in trunk/tkabber-plugins: . floatinglog

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Oct 20 22:14:54 MSD 2008


Author: sergei
Date: 2008-10-20 22:14:54 +0400 (Mon, 20 Oct 2008)
New Revision: 1566

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/floatinglog/floatinglog.tcl
Log:
	* floatinglog/floatinglog.tcl: Added messages about following
	  reconnect to an ignored messages list (thanks to Ruslan Rakhmanin).


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2008-10-20 16:51:12 UTC (rev 1565)
+++ trunk/tkabber-plugins/ChangeLog	2008-10-20 18:14:54 UTC (rev 1566)
@@ -1,3 +1,8 @@
+2008-10-20  Sergei Golovan <sgolovan at nes.ru>
+
+	* floatinglog/floatinglog.tcl: Added messages about following
+	  reconnect to an ignored messages list (thanks to Ruslan Rakhmanin).
+
 2008-10-19  Sergei Golovan <sgolovan at nes.ru>
 
 	* browser/browser.tcl, floatinglog/floatinglog.tcl,

Modified: trunk/tkabber-plugins/floatinglog/floatinglog.tcl
===================================================================
--- trunk/tkabber-plugins/floatinglog/floatinglog.tcl	2008-10-20 16:51:12 UTC (rev 1565)
+++ trunk/tkabber-plugins/floatinglog/floatinglog.tcl	2008-10-20 18:14:54 UTC (rev 1566)
@@ -8,14 +8,17 @@
 
     variable id 0
     variable winname .floatinglog
-    variable idlepat [string map {%s *} [::msgcat::mc "Idle for %s"]]
+    variable ignore_message_list ""
+    lappend ignore_message_list [string map {%s *} [::msgcat::mc "Idle for %s"]]
     set request_from [string map {%s *} [::msgcat::mc "%s request from %s"]]
-    variable iqibbpat [string replace $request_from \
+    lappend ignore_message_list [string replace $request_from \
 			[string first * $request_from] \
 			[string first * $request_from] iqibb]
-    variable ibbpat [string replace $request_from \
+    lappend ignore_message_list [string replace $request_from \
 			[string first * $request_from] \
 			[string first * $request_from] ibb]
+    lappend ignore_message_list [string map {%s *} \
+			[::msgcat::mc "Login retry for %s in %s"]]
 
     #
     # Options section
@@ -305,15 +308,13 @@
 }
 
 proc floatinglog::process_status {text} {
-    variable idlepat
-    variable iqibbpat
-    variable ibbpat
+    variable ignore_message_list
     variable options
 
     if {!$options(show_notifications)} return
-    if {[string match $idlepat $text]} return
-    if {[string match $iqibbpat $text]} return
-    if {[string match $ibbpat $text]} return
+    foreach ignore_message $ignore_message_list {
+	if {[string match $ignore_message $text]} return
+    }
 
     add_text $text
 }



More information about the Tkabber-dev mailing list