Guest User

Untitled

a guest
Mar 4th, 2018
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.92 KB | None | 0 0
  1.  
  2. bind pub * !mulai join:story
  3. bind pub * !stop stop:story
  4. proc join:story {nick uhost hand chan rest} {
  5.   global story_timers
  6.   set story "TCL/islam.db"
  7.   if {![info exists story_timers($story)]} {
  8.     slowmsg $story
  9.     } else {
  10.     puthelp "privmsg $nick :sudah berjalan boss cerita nya... selamat menikmati ...."
  11.   }
  12. }
  13.  
  14. proc stop:story {nick uhost hand chan rest} {
  15.  
  16.    foreach sectimer [utimers] {
  17.       set timerid [lindex $sectimer 2]
  18.       killutimer $timerid
  19.    }
  20. }
  21.  
  22.  
  23. proc slowmsg {file {pos 0}} {
  24.   global story_timers
  25.   set f [open $file]
  26.   seek $f $pos
  27.   if {[gets $f line]>-1} {
  28.     putserv "privmsg #islam :12,0$line"
  29.     set story_timers($file) [utimer 10 [list slowmsg $file [tell $f]]]
  30.     } else {
  31.     utimer 14 [list putserv "Re-reading the story:"]
  32.     set story_timers($file) [utimer 15 [list slowmsg $file]]
  33.   }
  34.   close $f
  35. }
  36.  
  37. putlog "cerita.tcl Loaded@...!"
Add Comment
Please, Sign In to add comment