31/10/2008, 14:10
Voila une petite procédure utile pour toi:
tcl
# choix du type de ban
set masktype 0
# valeurs possibles:
# 0 - *!*@machine.domain.com / *!*@555.555.555.555
# 1 - *!*ident@machine.domain.com / *!*ident@555.555.555.555
# 2 - *!*ident@*.domain.com / *!*ident@555.555.555.*
proc masktype {uhost} {
switch -exact -- $::masktype {
0 {return *!*[string range $uhost [string first @ $uhost] end]}
1 {return *!*$uhost}
2 {return *!*[lindex [split [maskhost $uhost] "!"] 1]}
}
return
}