SVN: toys/stbr/stbr.tcl

shadzik shadzik at pld-linux.org
Fri May 18 05:39:18 CEST 2007


Author: shadzik
Date: Fri May 18 05:39:16 2007
New Revision: 8604

Modified:
   toys/stbr/stbr.tcl
Log:
- pick a random developer with stbr rights and send the email to him/her when neither of the developers mentioned in cvs log have stbr rights


Modified: toys/stbr/stbr.tcl
==============================================================================
--- toys/stbr/stbr.tcl	(original)
+++ toys/stbr/stbr.tcl	Fri May 18 05:39:16 2007
@@ -20,6 +20,16 @@
 	putserv "privmsg $chan :$nick: Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp."
 }
 
+proc random {} {
+	global reqbook
+	set file [open $reqbook r]
+	gets $file hands
+	set range [llength $hands]
+	close $file
+	set whichone [expr {int(rand()*$range)}]
+	return [lindex $hands $whichone]
+}
+
 proc sendto {spec branch} {
 global cvsroot reqbook
 if {([string match HEAD $branch])} {set cmd "-N"} {set cmd "-r$branch"}
@@ -32,6 +42,7 @@
 		if {([string match $requester $devil])} {return $devil}
 	}
 }
+random
 }
 
 bind pub * !stbr pub:stbr


More information about the pld-cvs-commit mailing list