I want to rename some of irc command inside my mirc.exe.
for example:
rename /PRIVMSG to /PM inside mirc for ircd with /PM function only and do not have /privmsg function.

I need to make /PRIVMSG send as /PM to ircd server.
also send /JOIN as /J and mirc will understand.

is there way to rename commands via hooking or injection?

The mirc script alias is not the answer.
I know how to make mirc dlls and mirc scripting basically.