Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bind pub - !spam inputspam
- set id 0
- set spamonoff 0
- proc inputspam { nick host hand chan text } {
- global spamonoff id
- if { $text == "on" } {
- set spamonoff 1
- spam_timer
- }
- if { $text == "off" } {
- set spamonoff 0
- killutimer $id
- }
- }
- proc spam_timer { } {
- global spamonoff id
- if { $spamonoff == 1 } {
- spam
- set id [ utimer 1 spam_timer ]
- }
- }
- proc spam { } {
- set spamtxt "scripts/spam.txt"
- set spamfile [open $spamtxt r]
- set spamread [split [read $spamfile] \n]
- close $spamfile
- putquick "PRIVMSG #YourMomsHouse :[lindex $spamread [rand [llength $spamread]]]"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement