With this script you can make it return the nickname matching your search.
Example:
someone types: !kick Freck pwned
And the script has this:
.kick $chan $nick.s($2,$chan) $3
It will return the full nickname
or return if there are too many
if ($nick.s($2,$chan) == manymatch)
or it returns there is no match
if ($nick.s($2,$chan) == nomatch
alias nick.s {
if ($isid == $false) { halt }
unset %match
%count = 1
while (%count <= $nick($2,0)) {
if (* $+ $1 $+ * iswm $nick($2,%count) && %match) { return manymatch | break | halt }
if (* $+ $1 $+ * iswm $nick($2,%count)) { %match = $nick($2,%count) }
inc %count
}
if (!%match) { return nomatch }
if (%match) { return %match }
}