Actually, it's not in that line. The error you recieve is a tcl error, not an error reported from the irc server. I'd rather look at either onchan or getchanhost - most likely the parameters got mixed up in one of those commands.
Now that I look closer, that's a very prominent difference between the kick_user and kickban procs - the order of the arguments for onchan. Proper syntax is "onchan <target> [channel]", so make sure you've got something along these lines in your code...
# Setting:
set maskhostDefaultType 0
# The proc:
proc maskhost [list name [list type $maskhostDefaultType]] {
if {[scan $name {%[^!]!%[^@]@%s} nick user host]!=3} {
error "Usage: maskhost <nick!user@host> \[type\]"
}
if [string match {[3489]} $type] {
if [string match {*[0-9]} $host] {
set host [join [lrange [split $host .] 0 2] .].*
} elseif {[string match *.*.* $host]} {
set host *.[join [lrange [split $host .] end-1 end] .]
}
}
if [string match {[1368]} $type] {
set user *[string trimleft $user ~]
} elseif {[string match {[2479]} $type]} {
set user *
}
if [string match {[01234]} $type] {
set nick *
}
set name $nick!$user@$host
Is this really necessary and is it the right one? I reloaded both scripts(separated them into two different files), and I got a new error: Tcl error [user_reason]: Usage: maskhost <nick!user@host> [type]
So.. does that mean... that I need to do: MODE $chan +b [maskhost $whom! 0]?
Well, almost...
If you check closely, you'll see I use a slightly different commandline for the maskhost (in my previous post). It goes something like this:
maskhost expects nick!user@host, while getchanhost only returns the user@host part, the classic one manages without the nick-part (since it's never included in the mask anyway), however, given the setting of masktype, User's version needs the nick-part aswell...