like this
Code:
on *:input:#:{
  if ($readini(mirc.ini,text,commandchar) !isin $1) {
    var %i 1,%q
    while $gettok($1-,%i,32) {
      if ($v1 ison $chan) { 
        %q = %q $+(~,$v1,[x])
      }
      else { %q = %q $v1 }      
      inc %i
    }
    msg $chan %q  
    haltdef  
  }
  if ($istok(/notice /me /ame /amsg,$1,32)) {
    var %i 1,%q
    while $gettok($2-,%i,32) {
      if ($v1 ison $chan) { 
        %q = %q $+(~,$v1,[x])
      }
      else { %q = %q $v1 }      
      inc %i
    }
    $1 $chan %q  
    haltdef  
  }
}


i like that