If the homealien connection is always your second server connection, you could use something like
Code:
if ($scid(2).network != EFNet) { }

or
Code:
if $scid(2).server != irc.homelien.no) { }

However, the first one does not give you info on whether you're connected or not. The second one using server does not return a value if you're disconnected. So depending on whether you want to check if the server window for the EFNet server exists or if you're connected, use the first or the second one.

Disregarding all this, you could also simply make the server connecting an on START event or just use an alias to connect to the next server (but that's probably not what you want).