Using $remove() requires the encoded content to be in a text variable, which, if you're decoding a file means switching from simply using bread to using filter -k or $read() and a while loop. That not only causes major slowdown but more importantly still doesn't solve the problem of mIRC not correctly supporting the base64 encoding.