Advertisement
Guest User

Untitled

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