###################################################################### # Ultah By Fast666 - #eggdrop server irc6.eggdrop.eu # admin@hackingcode.co.cc # Version 1.0 # 03 agustus 2010 ###################################################################### bind pub - !ultah pub:ultah set activechan "#eggdrop" set txthope "/home/fast/allnet/scripts/ultah.txt" set delay 30 set init-server { timer [expr $delay] gethope } proc pub:ultah { 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 :6$nick data telah tersimpan" putserv "PRIVMSG $chan :3Tuliskan ucapan selamat ulang tahun utk temanmu di #eggdrop. Kalimat2 ucapan akan ditampilkan secara acak" } else { putserv "PRIVMSG $chan :Maaf anda tidak bisa ikut berpartisipasi dalam Ucapan Ulang Tahun, karena anda belum memiliki 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 :Tuliskan ucapan selamat ulang tahun utk temanmu di #eggdrop. Kalimat2 ucapan akan ditampilkan secara acak" 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 "Ultah loaded by Fast666"