This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Timed commands

Old posts that have not been replied to for several years.
B
Blue_Angel

Timed commands

Post by Blue_Angel »

Hello there.

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 =)

Angel
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

bind time "?5 * * * *" mytimedproc

proc mytimedproc {args} {
putserv "PRIVMSG chanserv :auth me cos i'm lame"
}
B
Blue_Angel

Post by Blue_Angel »

Thank u vewy much

/me bows

Angel
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

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 *
Have you ever read "The Manual"?
B
Blue_Angel

Post by Blue_Angel »

Ahhh fine

I just wondered why it didnt auth :D

Thank u2 =)

Angel
B
Blue_Angel

Post by Blue_Angel »

ok and i think now, where i added the args, it will work finally :D

Angel
B
Blue_Angel

Post by Blue_Angel »

bind time "?5 * * * *" auth
bind time "?0 * * * *" auth

proc auth {nick host handle chan text } {
putserv "PRIVMSG nickserv :identify DerKnecht *****"
}

T'is the script and no it doesnt work =/
prolly just a dumb mistake
B
Blue_Angel

Post by Blue_Angel »

Oh wait my bot ignored the services... how can i prevent it from doing that?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

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 :D
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.
Have you ever read "The Manual"?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

you can add a handle for services and give it +f so the bot won't ignore it.
B
Blue_Angel

Post by Blue_Angel »

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 ^^

What can I do?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

why dont you make it identify on connect, or when the services notice the bot (something like "nick owned by someone else")
User avatar
Rusher2K
Halfop
Posts: 88
Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:

Post by Rusher2K »

Use Script like :

Code: Select all

set nickpass "nickservpass"

bind join - * nickserv
proc nickserv { nick uhost hand args } {
    putlog "Start Identify to Nickserv"
    putserv "PRIVMSG nickserv :identify $nickpass"
    putlog "Done Identify to Nickserv"
  }
User avatar
TALES
Halfop
Posts: 59
Joined: Sun Nov 09, 2003 8:45 am
Location: Netherlands
Contact:

not tested

Post by TALES »

if the server gives a raw 307 that the nick is registered this could be it. Its just an id.Did not test it.

Code: Select all

#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 ??
B
Blue_Angel

Post by Blue_Angel »

Ok the problem is: my provider disconnects me every 24 hours (i know this isnt perfect for an eggy but ... :D) . 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

Greetings

Angel
Locked