Advertisement
Guest User

Untitled

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