I found that mIRC wasn't suitable for editing my hosts file. I was trying to relay some data through mIRC, but it seemed my hosts file just did not work. Some researching revealed that the user "NETWORK" needs to have read permissions on the hosts file. After a little testing, I can conclude that mIRC's /write -d switch does not preserve the user permissions for files.

You can reproduce this behaviour by creating file, say c:\test.txt. The file doesn't need actual content. Now, right click this file in windows explorer and hit Properties, go to the Security tab, click the Add button in the middle and add a few users to the list (in my case, user "NETWORK"). Now, in mIRC, try a simple //write -d c:\test.txt. Next, check the permissions for this file, you'll see they're gone.