## pub cmd auth -- start 
proc auth_pub {nick uhost hand rest} { 
global x botnick 
set pw [lindex $rest 0] 
if {$pw == ""} { 
putserv "PRIVMSG $channel :$j Usage: .login <password>" 
return 0 
} 
if {[matchattr $hand Q] == 1} { 
putserv "PRIVMSG $channel :$j u got r007" 
return 0 
} 
set ch [passwdok $hand ""] 
if {$ch == 1} { 
puthelp "NOTICE $nick :$p No password set. Type /msg $botnick PASS <password>" 
return 0 
} 
if {[passwdok $hand $pw] == 1} { 
chattr $hand +Q 
putcmdlog "$x #$hand# auth ..." 
putserv "PRIVMSG $channel :$p u l0gg3d in" 
} 
if {[passwdok $hand $pw] == 0} { 
putcmdlog "$x #$hand# auth FAILED" 
putserv "PRIVMSG $channel :$p f4il3d" 
} 
} 