im not sure it is a bug or if it is supposed to be this way, $serverip returns 255.255.255.255 in a disconnect event.

perhaps not needed, but the code to reproduce it:
on *:disconnect:{ echo -s $serverip }

i wanted to echo the server name and ip when getting disconnected when i noticed this, scripted around it for now.

btw, im using mirc 6.15 on winXP pro