Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Copyright 2014 Usmar A Padow (amigojapan) [email protected]
- #script for setting the channel to +M if more than 3 people vote to go to spam mode
- proc vote_spam_mode{} {
- upvar $variable votes ; #makes the gates variable global so it will persist
- upvar $variable spam_mode_set ; # makes a persistent variable to keep track of spam mode
- if {$votes > 3 && spam_mode_set != “true” } { ; # if more than 3 people voted for spam mode and also checks to see id spam_mode_set is not equal to true
- set spam_mode_set “true”
- pushmode #christiandebate +M
- timer 60 "pushmode #christiandebate -M; set spam_mode_set \“false\”” ; # will return the channel to -M after an hour, also set spam_mode_set to false
- set votes 0 ; #reset the votes to 0
- } else {
- set votes [expr {$votes + 1}] ; #adds a vote for spam mode
- }
- bind msg - !spam vote_spam_mode{} ; #binds the command for voting spam mode
Advertisement
Add Comment
Please, Sign In to add comment