To get the host from $uhost (ident@host) you can use the following
- Code:
-
set host [lindex [split $uhost @] 1]
Now you can use *!*@$host as a banmask.
Or you can use:
- Code:
-
scan $uhost %*\[^@\]@%s host
Which will also assign the host to $host.
To get both ident and host, you can use:
- Code:
-
scan ident@host %\[^@\]@%s ident host
Now you have the ident in $ident and the host in $host.