mIRC Homepage
i know that server names can be read by $server, but is there a more "specific" way to tell them apart? i'm trying to code local channel support, and i am having a bit of trouble with this. it's not that i can't tell the different servers apart using $server, but i just am afraid that server names will change and there may be a situation where multiple servers are named the same thing.

i thought of using $serverip, but that often doesn't work without error (many times it returns 255.255.255.255 for me for some reason, not always or anything though)... and everyone knows server ip's change.

does a solution exist, or should i just keep with using $server?
I would say stick with $server, but if you want to be safe, you could try a combination of that and $network.
If the network is using UnrealIRCd 3.2, then no two servers can have the same name, just like no two people on the network can use the same nick.

I believe this is true for all IRCd's, but don't guarantee it.
You could get the IP for the server and use that to distinguish them. I don't know if that would be more or less reliable than using $server. The $server name could change, but the server could also move to another IP address.

-genius_at_work
© mIRC Discussion Forums