[Tkabber-dev] r258 - trunk/plugins/reminder

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Dec 27 04:55:31 MSK 2009


Author: bigote
Date: 2009-12-27 04:55:30 +0300 (Sun, 27 Dec 2009)
New Revision: 258

Modified:
   trunk/plugins/reminder/reminder.tcl
Log:
Added a call of listrems procedure after setting a new reminder.
Removed code from /remind command which cleaned expired reminders
since there's such check in listrems procedure.


Modified: trunk/plugins/reminder/reminder.tcl
===================================================================
--- trunk/plugins/reminder/reminder.tcl	2009-12-26 02:26:57 UTC (rev 257)
+++ trunk/plugins/reminder/reminder.tcl	2009-12-27 01:55:30 UTC (rev 258)
@@ -110,24 +110,12 @@
                 Should be H\[H\]:MM:SS or M\[M\]:SS or S\[S\]" {}
                 return stop
             }
-            # This If removes expired reminders, if any.
-            if {[info exists rem_list]} {
-                set rem_number 1
-                set rl_1 $rem_list
-                foreach lri $rem_list {
-                    if {[clock seconds]<[lindex $lri 1]} {
-                        incr rem_number
-                    } else {
-                        set rl_1 [lreplace $rem_list $rem_number-1 $rem_number-1]
-                    }
-                }
-                set rem_list $rl_1
-            }
             set rid [after [expr {1000 * $timeout}] \
             [namespace current]::show_reminder [list $message]]
             set exp_date [expr {$timeout + [clock seconds]}]
             lappend listrem_item $rid $exp_date "$message"
             lappend rem_list $listrem_item
+            [namespace current]::list_reminders $chatid
         }
     }
     return stop



More information about the Tkabber-dev mailing list