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.

problem with qnet.tcl

Old posts that have not been replied to for several years.
Locked
M
MrT
Voice
Posts: 11
Joined: Wed Nov 06, 2002 11:57 pm

problem with qnet.tcl

Post by MrT »

hi, just downloaded and installed qnet.tcl, and it will auth my bot with q fine when the bot joins but i get an error from it which i believe is part of the function to check it is authed at given intervals...

Code: Select all

bind dcc m auth

set alltimers [timers]

for {set i 0} {$i < [llength $alltimers]} {incr i} {
  set this [lindex $alltimers $i]
  if {[lindex $this 1]=="auth"} {
    killtimer [lindex $this 2]
  }
}

timer 1 auth
proc auth {} {
global authtime regnick password
    putserv "PRIVMSG Q@cserve.quakenet.org :AUTH $regnick $password"
  timer $authtime auth
}

proc do_auth {nick uhost hand chan} {
 global regnick password
 if {$nick != "Q"} {
  return 0
 }
 putserv "MODE $chan +o $nick"
 putserv "PRIVMSG Q@cserve.quakenet.org :AUTH $regnick $password"
 putserv "PRIVMSG Q :OP $chan"
} 

proc auth {hand idx args} {
putserv "PRIVMSG Q@cserve.quakenet.org :AUTH $regnick $password"
}

set init-server {  
putserv "PRIVMSG Q@cserve.quakenet.org :AUTH $regnick $password"
 }
the error i get is:
Tcl error in script for 'timer47':
no value given for parameter "hand" to "auth"
the "timer47" part seems to increment each time the error occurs

i'd be grateful for any help you can offer.
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

You have two procs named "auth". The second one will overwrite the first one and that's what's causing this error. Either rename one of the procs (and change the calls to it) or remove the first one and change the argument part of the second one to only contain one argument called "args"
Have you ever read "The Manual"?
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

If you want script just for auto and seting mode +x, you can use this one:

Code: Select all

bind evnt - init-server my:connect
proc my:connect init-server {
  putquick "PRIVMSG Q@CServe.quakenet.org :AUTH Username Pass"
  putquick "MODE $::botnick +x"
}
Where is username out your username, and where is pass put your pass...
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

also in the auth proc, the regnick and password are not called globaly, then the variables won't exist.
M
MrT
Voice
Posts: 11
Joined: Wed Nov 06, 2002 11:57 pm

Post by MrT »

thanks guys, much appreciated
Locked