Any script which allows a person to tell a bot to "say" something can be used to cause all kinds of problems if you don't have protections included in the script to prevent that. You can't just send that message to normal mIRC and cause it to close. What happens is that your bot was repeating the command and that's always a danger.
You can put preventative code into your script to prevent such problems by checking any text sent to the bot for various commands which you wouldn't want used. For example, you would want to accept any message which includes //decode or //write or $dll. You could just use an if statement and halt the command if those are in the msg sent to the bot.