amigojapan

Script to set CD to +M when people vote for spam mode

Aug 22nd, 2014
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.92 KB | None | 0 0
  1. #Copyright 2014 Usmar A Padow (amigojapan) [email protected]
  2. #script for setting the channel to +M if more than 3 people vote to go to spam mode
  3.  
  4. proc vote_spam_mode{} {
  5.     upvar $variable votes ; #makes the gates variable global so it will persist
  6.     upvar $variable spam_mode_set ; # makes a persistent variable to keep track of spam mode
  7.     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
  8.     set spam_mode_set “true”
  9.     pushmode #christiandebate +M
  10.         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
  11.     set votes 0 ; #reset the votes to 0
  12.    } else {
  13.        set votes [expr {$votes + 1}] ; #adds a vote for spam mode
  14. }
  15.  
  16. bind msg - !spam vote_spam_mode{} ; #binds the command for voting spam mode
Advertisement
Add Comment
Please, Sign In to add comment