Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bind pub * !mulai join:story
- bind pub * !stop stop:story
- proc join:story {nick uhost hand chan rest} {
- global story_timers
- set story "TCL/islam.db"
- if {![info exists story_timers($story)]} {
- slowmsg $story
- } else {
- puthelp "privmsg $nick :sudah berjalan boss cerita nya... selamat menikmati ...."
- }
- }
- proc stop:story {nick uhost hand chan rest} {
- foreach sectimer [utimers] {
- set timerid [lindex $sectimer 2]
- killutimer $timerid
- }
- }
- proc slowmsg {file {pos 0}} {
- global story_timers
- set f [open $file]
- seek $f $pos
- if {[gets $f line]>-1} {
- putserv "privmsg #islam :12,0$line"
- set story_timers($file) [utimer 10 [list slowmsg $file [tell $f]]]
- } else {
- utimer 14 [list putserv "Re-reading the story:"]
- set story_timers($file) [utimer 15 [list slowmsg $file]]
- }
- close $f
- }
- putlog "cerita.tcl Loaded@...!"
Add Comment
Please, Sign In to add comment