mIRC allready have 2 indentifyers to do that!
they are:

$encode()

and

$decode()

First you need encode the line text you want, like this:

//echo -a $encode(Hello test)

when you press [ENTER] key, the echo command will return

*2&5L;&\@=&5S=```
this is the words "Hello test" encoded...
if you wanna decode the words we encoded you need use the $decode() identifier like this:

//echo -a $decode(*2&5L;&\@=&5S=```) , this is return the same words we talk about.

You can use some wilcards too, to modify or encodes/decodes your text, for that see the mIRC Help File.

Thats all

*