set login "L"
set b "[-] "
## delete cookie
bind part L * userinfopart
proc userinfopart { nick uhost hand chan msg } {
global login
if {[matchattr $hand L $chan]} {
chattr $hand -$login
dccbroadcast "$b$arg fez logout (part)"
}
return 0 }
bind sign L * userinfoquit
proc userinfoquit {nick uhost hand chan reason} {
if {[matchattr $hand L $chan]} {
chattr $hand -$login
dccbroadcast "$b$arg fez logout (sign)"
}
return 0 }
bind kick L * userinfokick
proc userinfokick {nick uhost hand chan target reason} {
if {[matchattr $hand L $chan]} {
chattr $hand -$login
dccbroadcast "$b$arg fez logout (kick)"
}
return 0 }
bind nick L * userinfonick
proc userinfokick {nick uhost hand chan newnick} {
if {[matchattr $hand L $chan]} {
chattr $hand -$login
dccbroadcast "$b$arg fez logout (nick change)"
}
return 0 }
putlog "userinfo-cookie.tcl"
## auth proc
bind msg U identificar msg:identificar
proc msg:identificar {nick uhost hand text} {
global login b
set pass [lindex $nick 0]
if {[passwdok $nick $pass]} {
putserv "notice $nick :identified!"
dcc:identificar { hand } ; return
} else {
putserv "notice $nick :not identified!" ; return
}
}
bind dcc b identificar dcc:identificar
proc dcc:identificar { hand } {
global login b
chattr $hand +$login
save
dccbroadcast "$b$hand fez login (pass auth)"
}
return }
###
i get a reply : "not identified!" when the pass is OK. why? did i confused $nick with $hand ?
am i calling right the bind dcc proc from the msg bind ? or setting calling non used vars inside bind msg?
regards,