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

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Dec 11 17:24:01 MSK 2009


Author: bigote
Date: 2009-12-11 17:24:01 +0300 (Fri, 11 Dec 2009)
New Revision: 248

Modified:
   trunk/plugins/bldjid/ChangeLog
   trunk/plugins/bldjid/bldjid.tcl
Log:
A counter added to "save log to file" feature to keep simple statistics and to know where new session begins in the log file.


Modified: trunk/plugins/bldjid/ChangeLog
===================================================================
--- trunk/plugins/bldjid/ChangeLog	2009-12-10 01:13:30 UTC (rev 247)
+++ trunk/plugins/bldjid/ChangeLog	2009-12-11 14:24:01 UTC (rev 248)
@@ -1,3 +1,17 @@
+2009-12-11  Serge Yudin  <xmpp:bigote at jabber.ru> <mailto:bigote at gmail.com>
+
+--- Version 0.6.2 of the plugin.
+
+--- Files modified:
+    bldjid.tcl, ChangeLog.
+
+--- Changes:
+	A small modification in "logging to file" feature:
+	A counter is added that allows you to keep very simple statistics
+	letting know how many visits (or unique visits, depending on your
+	bldjid settings) you have in your rooms (and also to know where
+	a new session begins in the log).
+
 2009-12-08  Serge Yudin  <xmpp:bigote at jabber.ru> <mailto:bigote at gmail.com>
 
 --- Version 0.6.1 of the plugin.

Modified: trunk/plugins/bldjid/bldjid.tcl
===================================================================
--- trunk/plugins/bldjid/bldjid.tcl	2009-12-10 01:13:30 UTC (rev 247)
+++ trunk/plugins/bldjid/bldjid.tcl	2009-12-11 14:24:01 UTC (rev 248)
@@ -1,4 +1,4 @@
-# "Bldjid" plugin for Tkabber. 2009-12-09 v. 0.6.1
+# "Bldjid" plugin for Tkabber. 2009-12-11 v. 0.6.2
 # Written by Serge Yudin xmpp:bigote at jabber.ru
 # See README file for usage.
 
@@ -8,6 +8,8 @@
 # An array where all user entrances are stored.
 	global jids_by_chats
 
+	variable ent_cntr 1
+
 	event add <<ToggleMonitor>> <Control-m>
 
 		set winid 0
@@ -92,6 +94,7 @@
 	global grouproster
 	global jids_by_chats
 	variable options
+	variable ent_cntr
 	if {!$options(enable_jids_gathering)} {
 		return
 	}
@@ -105,7 +108,6 @@
 	} else {
 		return
 	}
-
 	if {[::chat::is_opened $chatid]} {
 		if {[::chat::is_groupchat $chatid]} {
 			if {[::xmpp::jid::resource $jid] == ""} {
@@ -143,8 +145,9 @@
 				::chat::add_message $chatid $group groupchat $msg {}
 			}
 			if {$options(log_file) != {}} {
-                set msg4log "$ts\t$group\t$nick\t$real_jid"
+                set msg4log "$ent_cntr\t$ts\t$group\t$nick\t$real_jid"
 			    [namespace current]::log_msg $msg4log
+				incr ent_cntr
 			}
 		}
 	}



More information about the Tkabber-dev mailing list