bind pub * !story join:story
bind pub o|o !stop stop:story
proc join:story {nick uhost hand chan rest} {
global story_timers
set story "/home/s/sapri/mujahid/isi/db/isi.db"
if {![info exists story_timers($story)]} {
slowmsg $story
} else {
puthelp "privmsg $nick :Mohon tunggu sedang membaca files..."
}
}
proc stop:story {nick uhost hand chan arg} {
global story_timers
if {[info exists story_timers]} {
killtimer story_timers*
} else {
puthelp "privmsg $nick :Terima kasih sudah membaca cerita ane..."
}
}
proc slowmsg {file {pos 0}} {
global story_timers
set f [open $file]
seek $f $pos
if {[gets $f line]>-1} {
putserv "privmsg #Tausiyah :12 $line"
set story_timers($file) [utimer 11 [list slowmsg $file [tell $f]]]
} else {
utimer 15 [list putserv "Membaca kembali files:"]
set story_timers($file) [utimer 16 [list slowmsg $file]]
}
close $f
}
hello can anyone help me? I have tried all the scripts on this forum but they all don't work. Please me, what about the scripts if I want to stop when I type! Story. Thank you in advance