
putlog "QuakeNet v1.0 by lou loaded ... borrowed from Stanver"

# Auto-Auth With Q
bind join - * do_auth


set authtime 120

# Set your bot's registerded nick and password. 
set regnick "LENOMDUAUTH"
set password "LEPASSDUAUTH"

### Code

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"
 }
 
### lou @ #dmm on irc.de.quakenet.org