You can also try using another variation of the script code with one common alias to check the nick, format and send the echo message:
Code
on ^*:TEXT:*:#: haltdef | emsg $chan $nick $1-
on *:INPUT:#: if (/* !iswm $1) { haltdef | .msg $chan $1- | emsg $chan $me $1- }

alias -l emsg {
  var %time $+(94,$time(HH:nn:ss))
  if ($2 isop $1) { var %nick $+(04,$2) }
  elseif ($2 ishop $1) { var %nick $+(09,$2) }
  elseif ($2 isvoice $1) { var %nick $+(00,$2) }
  else { var %nick $+(07,$2) }
  echo $1 %time %nick :15 $3-
}


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples