| View previous topic :: View next topic |
| Author |
Message |
abah Halfop
Joined: 01 Dec 2013 Posts: 61 Location: Indonesia
|
Posted: Tue Feb 17, 2015 6:29 am Post subject: please help |
|
|
I would like to ask a little help for the script because I do not know how to make it stop when! start can not be made script stopkan please !stop thanks
| Code: | bind pub * !story join:story
proc join:story {nick uhost hand chan rest} {
global story_timers
set story "cerita/ukhuwah.txt"
if {![info exists story_timers($story)]} {
slowmsg $story
} else {
puthelp "privmsg $nick :already reading..."
}
}
proc slowmsg {file {pos 0}} {
global story_timers
set f [open $file]
seek $f $pos
if {[gets $f line]>-1} {
putserv "privmsg #Ukhuwah :$line"
set story_timers($file) [utimer 11 [list slowmsg $file [tell $f]]]
} else {
utimer 15 [list putserv "Re-reading the story:"]
set story_timers($file) [utimer 16 [list slowmsg $file]]
}
close $f
} |
|
|
| Back to top |
|
 |
Get_A_Fix Master

Joined: 07 May 2005 Posts: 206 Location: New Zealand
|
Posted: Wed Feb 18, 2015 2:16 pm Post subject: |
|
|
In this case it would be pretty easy, you'd just have to add a killtimer to a !stop command.
| Code: |
bind pub o|o !stop stop:story
proc stop:story {nick uhost hand chan arg} {
global story_timers
if {[info exists story_timers]} {
killtimer story_timers*
}
}
|
Or something to that effect.
This binds using o|o (globalop|chanop) - reducing the use to everyone, thus minimising on unwanted flood attempts. _________________ We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals. |
|
| Back to top |
|
 |
abah Halfop
Joined: 01 Dec 2013 Posts: 61 Location: Indonesia
|
Posted: Thu Feb 19, 2015 1:42 am Post subject: |
|
|
thank for response i try
Edit: thanks for the help and the response will be, but I've tried and it did not work if there is another search? |
|
| Back to top |
|
 |
|