SVN: toys/stbr/stbr.tcl

shadzik shadzik at pld-linux.org
Mon Nov 3 00:15:51 CET 2008


Author: shadzik
Date: Mon Nov  3 00:15:50 2008
New Revision: 9930

Modified:
   toys/stbr/stbr.tcl
Log:
- cancellation for spec functionality
- ver. 0.8a


Modified: toys/stbr/stbr.tcl
==============================================================================
--- toys/stbr/stbr.tcl	(original)
+++ toys/stbr/stbr.tcl	Mon Nov  3 00:15:50 2008
@@ -3,6 +3,7 @@
 set cmdbook "./scripts/cmdbook.txt"
 set logfile "/home/users/stbr/db/stbrlog.db"
 set script "./scripts/cvslog.sh"
+set cancellation "./scripts/cancellation.sh"
 set makereq "./pld-builder.new/client/make-request.sh"
 set back &
 set cntr 0
@@ -84,7 +85,7 @@
 bind pub * !del pub:del
 
 proc pub:del {nick host hand chan arg} {
-global logfile
+global logfile cancellation
 	if {([matchattr $hand n|m])} {
 		set usage "Usage: !del spec date time"
 		set spec [lindex $arg 0]
@@ -95,10 +96,13 @@
 			return 0
 		}
 		set date ""; append date $day; append date " "; append date $hour
+		set developer [exec sqlite $logfile "select recipient from application where spec='$spec' and date='$date';"]
+		set email ""; append email $developer; append email "@pld-linux.org"
 		putcmdlog "Deleting entry for: $spec on $date"
 		exec sqlite $logfile "DELETE FROM application where spec='$spec' and date='$date';"
 		exec sqlite $logfile "DELETE FROM stbr where date='$date';"
-		putserv "privmsg $chan :$nick: Done."
+		exec $cancellation $spec $email $hand
+		putserv "privmsg $chan :$nick: Request deleted. Cancellation e-mail sent to $developer"
 	}
 }
 
@@ -164,4 +168,4 @@
 if {$cntr<1} {incr cntr} {utimer 30 "set cntr 0"; return 1}
 }
 
-putlog "Send To Builder Request TCL v0.8 by shadzik loaded."
+putlog "Send To Builder Request TCL v0.8a by shadzik loaded."


More information about the pld-cvs-commit mailing list