Jethro commented on a Page, Mimic  -  Dec 19, 2010

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.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.