mIRC doesn't do things like that because there is a trojn called script.ini. It is the other way around. Script kiddies call the file script.ini to make it look like a legitimate file.
How does one avoid getting the bad version? Don't visit websites that are advertised on IRC unless they are trusted ones that people you know have visited before. It is that simple.
If you don't want your scripts to end with .ini then just change the file extension to something else. .mrc is popular though most (including whatever you choose to invent) will work with no drama at all.