Author: shadzik
Date: Fri May 18 00:39:13 2007
New Revision: 8599
Modified:
toys/stbr/stbr.tcl
Log:
- fix a bug where all request of a user were deleted if spec was not found in
repo
(thx to sparky for pointing this out)
Modified: toys/stbr/stbr.tcl
==============================================================================
--- toys/stbr/stbr.tcl (original)
+++ toys/stbr/stbr.tcl Fri May 18 00:39:13 2007
@@ -40,11 +40,10 @@
if {([string match th-ready $first])} {set first "upgrade"}
set time [clock seconds]
set date [clock format $time -format "%d.%m.%Y %H:%M:%S"]
-exec sqlite $logfile "INSERT INTO stbr VALUES('$date','$nick');"
foreach spec $specs {
if {([string match *:* $spec])} {set splited [split $spec ":"];set spec
[lindex $splited 0]; set branch [lindex $splited 1]} {set branch "HEAD"}
if {!([string match *.spec $spec])} { append spec ".spec"}
-if {([cvs $spec $branch] == 0)} {putserv "privmsg $chan :$nick: There is no
such spec ($spec) on branch $branch in PLD's repository."; exec sqlite $logfile
"delete from stbr where sender='$nick';"; return 0}
+if {([cvs $spec $branch] == 0)} {putserv "privmsg $chan :$nick: There is no
such spec ($spec) on branch $branch in PLD's repository."; return 0}
lappend rspecs $spec; append rspecs ":$branch"
if {[exec $file $nick $first $spec $branch]==0} {putserv "privmsg $chan
:$nick: An error occured. Couldn't send STBR Mail for $spec."; return 1}
set tfile [open $towho r]
@@ -52,6 +51,7 @@
close $tfile
exec sqlite $logfile "INSERT INTO application
VALUES('$date','$spec','$branch','$person','$first');"
}
+exec sqlite $logfile "INSERT INTO stbr VALUES('$date','$nick');"
putserv "privmsg $chan :$nick: Sent STBR Mail, an $first will be performed for
$rspecs."
if {$cntr<1} {incr cntr} {utimer 30 "set cntr 0"; return 1}
}
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit