[Tkabber-dev] r205 - trunk/plugins/bldjid

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Apr 7 16:15:32 MSD 2009


Author: bigote
Date: 2009-04-07 16:15:31 +0400 (Tue, 07 Apr 2009)
New Revision: 205

Modified:
   trunk/plugins/bldjid/ChangeLog
   trunk/plugins/bldjid/README
   trunk/plugins/bldjid/bldjid.tcl
Log:
Code optimization (thanks for regexp to Alexey Smirnov <mailto:alexey.smirnov at gmx.com>).


Modified: trunk/plugins/bldjid/ChangeLog
===================================================================
--- trunk/plugins/bldjid/ChangeLog	2009-04-07 03:09:41 UTC (rev 204)
+++ trunk/plugins/bldjid/ChangeLog	2009-04-07 12:15:31 UTC (rev 205)
@@ -1,5 +1,15 @@
 2009-04-07  Serge Yudin  <xmpp:bigote at jabber.ru> <mailto:bigote at gmail.com>
 
+--- Version 0.5.10 of the plugin.
+--- Files modified:
+    bldjid.tcl, ChangeLog.
+
+--- Changes:
+	Code optimization (regexp used in proc bldjid::visitors_compls,
+	Thanks to Alexey Smirnov <mailto:alexey.smirnov at gmx.com>).
+
+2009-04-07  Serge Yudin  <xmpp:bigote at jabber.ru> <mailto:bigote at gmail.com>
+
 --- Version 0.5.9 of the plugin.
 --- Files modified:
     bldjid.tcl, README, TODO, ChangeLog.

Modified: trunk/plugins/bldjid/README
===================================================================
--- trunk/plugins/bldjid/README	2009-04-07 03:09:41 UTC (rev 204)
+++ trunk/plugins/bldjid/README	2009-04-07 12:15:31 UTC (rev 205)
@@ -129,4 +129,4 @@
 
 Plugin's name takes its origin from a Russian word "bldjad" and "JID."
 It also could be taken as an acronim: "Ban Lousy Dorks (by) JID."
-Most part of its code is stolen^W taken from "Urlcmd" plugin and muc.tcl module.
+A big part of its code is stolen^W taken from "Urlcmd" plugin and muc.tcl module.

Modified: trunk/plugins/bldjid/bldjid.tcl
===================================================================
--- trunk/plugins/bldjid/bldjid.tcl	2009-04-07 03:09:41 UTC (rev 204)
+++ trunk/plugins/bldjid/bldjid.tcl	2009-04-07 12:15:31 UTC (rev 205)
@@ -1,4 +1,4 @@
-# "Bldjid" plugin for Tkabber. 2009-04-07 v. 0.5.9
+# "Bldjid" plugin for Tkabber. 2009-04-07 v. 0.5.10
 # Written by Serge Yudin xmpp:bigote at jabber.ru
 # See README file for usage.
 
@@ -152,10 +152,7 @@
 					  {/visitors } {/visited } {/bldhelp }
 	}
 
-	if {($wordstart && [string match {/bldjid*} $line]) \
-	||  ($wordstart && [string match {/banjid*} $line]) \
-	||  ($wordstart && [string match {/unban*} $line]) \
-	||  ($wordstart && [string match {/unbldjid*} $line])} {
+	if {$wordstart && [regexp {^/(bldjid|banjid|unban|unbldjid).*} $line]} {
 		set jidcomps {}
 		foreach jid $user_list {
 			if {$jid != ""} {



More information about the Tkabber-dev mailing list