Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set randomtrigger "!rprp"
- bind pub -* $randomtrigger rquote
- proc rquote {nick uhost hand chan arg} {
- set quotes ""
- set data [open "./scripts/quote.txt" r]
- while { ![eof $data] } {
- set quote [gets $data]
- if { $quote != "" } {
- set quotes [linsert $quotes end $quote]
- }
- }
- close $data
- set random [rand [llength $quotes]]
- if { [expr $random >= 0] && [expr $random < [llength $quotes]] } {
- set quote [lindex $quotes $random]
- set out1 [lrange [split $quote] 1 end]
- set out [lindex $quote 0]
- }
- if { $quote != "" } {
- putquick "privmsg $chan :$out1"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement