I declare myself as a n00b to tcl ^^
Cuz my egg doenst get managed to auth each time it gets booted off the server, I wanted to write a script, processing a certain command every 5 minutes, but I didnt find anything on that.. i searched google for hours and well...
Thanks for answers =)
GodOfSuicide wrote:bind time "?5 * * * *" mytimedproc
That's every 10 minutes. (05 15 25 etc...)
Add another bind for "?0 *" and you've got it.
Oh and btw: there's no need to have several *'s in the mask...those spaces will be matched by the first *
Change some conf settings. 'flood-msg' or 'trigger-on-ignore' or both depending on what you want to achieve.
Blue_Angel wrote:ok and i think now, where i added the args, it will work finally
The example proc provided by the suicide dude was perfectly valid because of the special meaning of the argument name 'args' (check out http://tcl.tk/man/tcl8.4/TclCmd/proc.htm for details). Your variable names has nothing to do with what's passed to the proc and you don't need the arguments in separate variables because you don't use them.
Sorryy... but i have to bring this up again
The script doesnt seem to work...
My bot is getting booted off every 24 hours, and after that the services won't recognize him... and keep him changing his nick every 10 seconds or so ^^
#set this to your nickserv pass
set tls_nickpass "nickservpass"
bind time "?5 *" tls:whois
bind time "00 *" tls:whois
#raw 307 is for registered nick
bind raw - 307 tls:ident
proc tls:ident {from key arg} {
global tls_regist
set tls_regist [strlwr [lindex [lrange [split $arg ":"] 1 end] 0]]
if {$tls_regist == “IS A REGISTERED NICK”} {
#no need for identify kill timer
foreach j [timers] {
if {[lindex $j 1] == "tls:nickserv"} { killtimer [lindex $j 2] }
}
return
}
proc tls:whois {nick host hand chan} {
global botnick
putserv "WHOIS $botnick"
utimer 20 tls:nickserv
}
#proc done by Rusher
proc tls:nickserv {nick uhost hand args} {
putlog "Start Identify to Nickserv"
putserv "PRIVMSG nickserv :identify $tls_nickpass"
putlog "Done Identify to Nickserv"
}
maybe your bot get booted because your bot identify every 5 min ?? I think a whois on your self that does not bother the server or get noticed by the server.A identify could be noticed by the server and you get booted ??
Ok the problem is: my provider disconnects me every 24 hours (i know this isnt perfect for an eggy but ... ) . my bot gets disconnected but its nick doesnt ping off.. so i got the prob that it changes to 2nd nick but when it changes back to normal nick it has to identify again, and that's what's not working