SVN: toys/stbr/stbr.tcl

shadzik shadzik at pld-linux.org
Mon May 14 22:29:30 CEST 2007


Author: shadzik
Date: Mon May 14 22:29:25 2007
New Revision: 8533

Modified:
   toys/stbr/stbr.tcl
Log:
- insert reqester to DB just once


Modified: toys/stbr/stbr.tcl
==============================================================================
--- toys/stbr/stbr.tcl	(original)
+++ toys/stbr/stbr.tcl	Mon May 14 22:29:25 2007
@@ -30,6 +30,7 @@
 if {!([string match th-ready $first] || [string match th-test $first])} {putserv "privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ..."; return 0}
 if {([string length $second]<2)} {putserv "privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ..."; return 0}
 if {$cntr<1} {incr cntr} {utimer 30 "set cntr 0"; putserv "privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later."; return 0}
+exec sqlite $logfile "INSERT INTO stbr VALUES('$date','$nick');"
 foreach spec $specs {
 set time [clock seconds]
 set date [clock format $time -format "%d.%m.%Y %H:%M:%S"]
@@ -40,7 +41,6 @@
 set tfile [open $towho r]
 gets $tfile person; append rspecs " (to $person)"
 close $tfile
-exec sqlite $logfile "INSERT INTO stbr VALUES('$date','$nick');"
 exec sqlite $logfile "INSERT INTO application VALUES('$date','$spec','$person','$first');"
 }
 putserv "privmsg $chan :$nick: Sent STBR Mail to $first for $rspecs."


More information about the pld-cvs-commit mailing list