The mirc.ini file might not be in the mIRC directory all of the time (when the -i command line parameter is used), so it would be better to use $mircini instead.

Might also be worth checking $inpaste and /returning if it's $true.