Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set fh [open "/home/chachin/eggdrop/boobs.txt" r]
- set ::_boobs_data [split [read -nonewline $fh] \n]
- close $fh
- bind pub - !boobs boobs
- bind pub - !10boobs 10boobs
- bind pub - !add addboobs
- proc getboobs { n } {
- set len [llength $::_boobs_data]
- set boobs {}
- for {set x 0} {$x<$n} {incr x} {
- set i [expr int($len*rand())]
- set line [lindex $::_boobs_data $i]
- lappend boobs $line
- }
- return $boobs
- }
- proc addboobs {nick uhost hand chan text} {
- if {![string equal -nocase $chan "#chick3n"]} { return }
- set url [lindex $text 0]
- set fp [open "boobs.txt" a]
- puts $fp $url
- close $fp
- lappend ::_boobs_data $url
- puthelp "privmsg $chan new link added successfully :D"
- }
- }
- proc boobs {nick uhost hand chan text} {
- if {![string equal -nocase $chan "#chick3n"]} { return }
- set boobs [getboobs 1]
- foreach line $boobs {
- puthelp "privmsg $chan :$line \002nsfw\002"
- }
- }
- proc 10boobs {nick uhost hand chan text} {
- if {![string equal -nocase $chan "#chick3n"]} { return }
- set boobs [getboobs 10]
- foreach line $boobs {
- puthelp "privmsg $chan :$line \002nsfw\002"
- }
- }
- putlog "loading v0.1 boobs.tcl"
Advertisement
Add Comment
Please, Sign In to add comment