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

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Apr 26 02:14:22 MSD 2009


Author: bigote
Date: 2009-04-26 02:14:21 +0400 (Sun, 26 Apr 2009)
New Revision: 220

Modified:
   trunk/plugins/bldjid/ChangeLog
   trunk/plugins/bldjid/README
   trunk/plugins/bldjid/bldjid.tcl
Log:
A bug fixed in autocompletion procedure that gave an error when trying
to autocomplete JIDs when no user list is created yet.


Modified: trunk/plugins/bldjid/ChangeLog
===================================================================
--- trunk/plugins/bldjid/ChangeLog	2009-04-16 01:15:40 UTC (rev 219)
+++ trunk/plugins/bldjid/ChangeLog	2009-04-25 22:14:21 UTC (rev 220)
@@ -1,3 +1,14 @@
+2009-04-25  Serge Yudin  <xmpp:bigote at jabber.ru> <mailto:bigote at gmail.com>
+
+--- Version 0.5.17 of the plugin.
+--- Files modified:
+    bldjid.tcl, README, ChangeLog.
+
+--- Changes:
+	A bug fixed in autocompletion procedure that gave an error when trying
+	to autocomplete JIDs when no user list is created (no one
+	of /visit* commands used).
+
 2009-04-16  Serge Yudin  <xmpp:bigote at jabber.ru> <mailto:bigote at gmail.com>
 
 --- Version 0.5.16 of the plugin.

Modified: trunk/plugins/bldjid/README
===================================================================
--- trunk/plugins/bldjid/README	2009-04-16 01:15:40 UTC (rev 219)
+++ trunk/plugins/bldjid/README	2009-04-25 22:14:21 UTC (rev 220)
@@ -80,6 +80,8 @@
 	after generating a user list by any of /visit* commands.
 	If there is no such list, only nicks autocompletion works
 	(which is not what you need).
+-   Please note that autocompletion doesn't work if you have not created
+	any user list, i.e. you have not used any of /visit* commands yet.
 
 =====================
 ####  CUSTOMIZE  ####

Modified: trunk/plugins/bldjid/bldjid.tcl
===================================================================
--- trunk/plugins/bldjid/bldjid.tcl	2009-04-16 01:15:40 UTC (rev 219)
+++ trunk/plugins/bldjid/bldjid.tcl	2009-04-25 22:14:21 UTC (rev 220)
@@ -1,4 +1,4 @@
-# "Bldjid" plugin for Tkabber. 2009-04-16 v. 0.5.16
+# "Bldjid" plugin for Tkabber. 2009-04-25 v. 0.5.17
 # Written by Serge Yudin xmpp:bigote at jabber.ru
 # See README file for usage.
 
@@ -161,13 +161,17 @@
 
 	if {$wordstart && [regexp {^/(bldjid|banjid|unban|unbldjid).*} $line]} {
 		set jidcomps {}
-		foreach jid $user_list {
-			if {$jid != ""} {
-				lappend jidcomps [lindex $jid 2]
+		if {[info exists user_list]} {
+			foreach jid $user_list {
+				if {$jid != ""} {
+					lappend jidcomps [lindex $jid 2]
+				}
 			}
+			set jidcomps [lsort -dictionary -unique $jidcomps]
+			set comps [concat $jidcomps $comps]
+		} else {
+			return stop
 		}
-		set jidcomps [lsort -dictionary -unique $jidcomps]
-		set comps [concat $jidcomps $comps]
 	}
 }
 



More information about the Tkabber-dev mailing list