mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2006
Posts: 26
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2006
Posts: 26
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?

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
I would say stick with $server, but if you want to be safe, you could try a combination of that and $network.


-KingTomato
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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


Link Copied to Clipboard