Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.69 KB | None | 0 0
  1. bind pub - !spam inputspam
  2. set spamonoff 0
  3.  
  4. proc inputspam { nick host hand chan text } {
  5.     global spamonoff
  6.     if { $text == "on" } {
  7.         set spamonoff 1
  8.         spam_timer
  9.     }
  10.     if { $text == "off" } {
  11.         set spamonoff 0
  12.     }
  13. }
  14.  
  15. proc spam_timer {  } {
  16.     global spamonoff
  17.     if {[utimerexists spam] == ""} {
  18.         utimer 1 spam
  19.     }
  20. }
  21.  
  22. proc spam {  } {
  23.     global spamonoff
  24.     set spamtxt "scripts/spam.txt"
  25.     set spamfile [open $spamtxt r]
  26.     set spamread [split [read $spamfile] \n]
  27.     close $spamfile
  28.     putquick "PRIVMSG #YourMomsHouse :[lindex $spamread [rand [llength $spamread]]]"
  29.     if { $spamonoff == 1 }
  30.         spam_timer
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement