18/11/2012, 10:44
(Modification du message : 18/11/2012, 10:48 par heartbroken.)
salut a tous..
hi .a friend of mine ask me for help for about a code what he uses on his eggdrop. he said he uses this code for triggering some help lines on channel.its a very simple code what he used. so he asked me that some help triggers are too long,and i want to cut that off with a "!stop" command and than bot should stop posting these help lines on channel.
(by the way those help lines not in a readable .txt file)
so i tried couple of things allnight long on this code.but i couldn't make it to stop the bot posting lines.here it is my edit of the code :
but as you can see ,its not working .so than i connect #egghelp channel for to get a suggestion how can i do that !stop thing*.
and speechless suggest me to edit like that,they said it should work like that.here is the second edition of this code:
but this edition is not working either...
and it has some terrible issues : like when it starts !stop not working and gave an error on partyline like : invalid timerID stop_foo..
and if when make it !stop you have to restart the bot after to try second time !start command..so its useless and not working for to stop posting lines.
so i would like to open a new thread in here for to ask your advices and suggestions for about this issue.
thanks in advance.
hi .a friend of mine ask me for help for about a code what he uses on his eggdrop. he said he uses this code for triggering some help lines on channel.its a very simple code what he used. so he asked me that some help triggers are too long,and i want to cut that off with a "!stop" command and than bot should stop posting these help lines on channel.
(by the way those help lines not in a readable .txt file)
so i tried couple of things allnight long on this code.but i couldn't make it to stop the bot posting lines.here it is my edit of the code :
Code :
bind pub - !start foo_start
bind pub - !stop stop_foo
proc foo_start {nick uhost hand chan text} {
if {![isop $nick $chan]} {
global foo_status
set foo_status 1
if {!$foo_status} break
utimer 15 [list puthelp "PRIVMSG $chan :message"]
utimer 25 [list puthelp "PRIVMSG $chan :message 1"]
utimer 35 [list puthelp "PRIVMSG $chan :message 2"]
utimer 45 [list puthelp "PRIVMSG $chan :message 3"]
}
}
proc stop_foo {nick uhost hand chan text} {
global foo_status
set foo_status 0
}
and speechless suggest me to edit like that,they said it should work like that.here is the second edition of this code:
Code :
bind pub - !start foo_start
bind pub - !stop stop_foo
proc foo_start {nick uhost hand chan text} {
if {![isop $nick $chan]} {
global foo_status
if {![array exists foo_status]} {
set foo_status(1) [utimer 15 [list puthelp "PRIVMSG $chan :message"]]
set foo_status(2) [utimer 25 [list puthelp "PRIVMSG $chan :message 1"]]
set foo_status(3) [utimer 35 [list puthelp "PRIVMSG $chan :message 2"]]
set foo_status(4) [utimer 45 [list puthelp "PRIVMSG $chan :message 3"]]
}
}
}
proc stop_foo {nick uhost hand chan text} {
global foo_status
foreach timer [list 1 2 3 4] { killutimer $timer }
array unset foo_status
}
but this edition is not working either...
and it has some terrible issues : like when it starts !stop not working and gave an error on partyline like : invalid timerID stop_foo..
and if when make it !stop you have to restart the bot after to try second time !start command..so its useless and not working for to stop posting lines.
so i would like to open a new thread in here for to ask your advices and suggestions for about this issue.
thanks in advance.