You can even shrink the alias more by using regsubex for the reverse part of the code:
alias -l mimic {
if ($left($1,1) == !) { halt }
if ($nick == %mnick) && (# == %chnl) {
if (%mimic) {
$iif($event = text,msg,$iif($event = notice,notice,$iif($event = action,describe))) # $1-
}
elseif (%rmimic) {
$iif($event = text,msg,$iif($event = notice,notice,$iif($event = action,describe))) # $regsubex($1-,/(.)/g,$mid(\A,-\n,1)))
}
}
}
You don't have to repeate the %mnick and %chnl variables. Just make an if condition will get both routines covered.