Code:
alias _prefix return -,!,.

alias transmit {
  if ($left($1,1) == !) { echo -a msg $chan $2- }
  elseif ($left($1,1) == -) { echo -a msg $nick $2- }
  elseif ($left($1,1) == .) { echo -a notice $nick $2- }
}

On *:Text:*:#my-chan: {
  if ($istok($_prefix,$left($1,1),44)) {
    if ($mid($1,2-) == test) transmit $1 Test was a success!
  }
}


I changed the $prefix identifier to $_prefix as mIRC already uses that identifier.