###################################################################### # FB TCL By Fast666 - #eggdrop Allnetwork # admin@hackingcode.co.cc # Version 1.0 # 03 agustus 2010 ###################################################################### bind pub - !fb pub:fb set activechan "#eggdrop" set txthope "/home/fast/allnet/scripts/fb.txt" set delay 30 set init-server { timer [expr $delay] gethope } proc pub:fb { nick uhost hand chan text } { global activechan set hope [lrange $text 0 end] if { $hope != "" } { if { [isvoice $nick $chan] } { savehope "13-=- $hope (by. $nick) -=-" putserv "PRIVMSG $chan : data facebook telah tersimpan" putserv "PRIVMSG $chan : masukan data facebook ketik !fb " } else { putserv "PRIVMSG $chan : Maaf silahkan hubungi operator @ untuk voice" } } else { putserv "PRIVMSG $chan : Format salah! Ketik !ultah " } } proc gethope {} { global txthope activechan delay set lines [getdatafromtxt $txthope] set line [lindex $lines [rand [llength $lines]]] putserv "PRIVMSG $activechan :$line" putserv "PRIVMSG $activechan : simpan data facebook kamu ketik !fb " timer [expr $delay] gethope } proc savehope { message } { global txthope set con [open $txthope r] set data [read $con] close $con set con [open $txthope "w"] puts $con "$message" puts -nonewline $con $data close $con } proc getdatafromtxt { filepath } { set con [open $filepath r] set data [read $con] close $con set data [split $data "\n"] return $data } putlog "facebook TCL loaded by Fast666"