# $EPIC: hostname.txt,v 1.4 2006/09/19 10:52:37 sthalik Exp $
hostname <hostname for ipv4 and ipv6>
hostname [hostname for ipv4]/[hostname for ipv6]
EPIC has many opportunities to create internet connections. The most obvious circumstances are server connections and dcc connections. Every internet connection has a specific internet protocol (IP) address (in IPv4, addresses are 32 bit integers; in IPv6, they are larger) for both you and for the person you're talking to.
By default, EPIC does not specify which IP address should be used for you; it leaves that choice up to the operating system. This is suitable for most users who have only one IP address. Some users have more than one IP address available to them, and they do not want to use the system's primary IP address but rather one of the auxiliary IP addresses. (Mostly for vanity purposes). The hostname command lets you specify a specific local IP address that EPIC will use for further connections.
The argument to hostname must be a fully qualified internet hostname that resolves to an IP address (or a numeric IP address) that your machine is configured to handle. No error checking is done; if you specify the hostname of another host, EPIC will blithely try to use that invalid ip address as the local host and all further connections will FAIL SILENTLY. This is not a bug; EPIC can't be reasonably expected to know whether or not a hostname you give it is valid for your machine – that's the job of you, the user.
You must of course use the reconnect command after using the hostname command before the new hostname will be seen by other users on irc. The hostname command never affects any connections that already exist beforehand.
It is possible to set distinct hostnames for IPv4 and IPv6 connections. To change both of them at one time, use “/hostname ipv4_hostname/ipv6_hostname”. You can omit one of the hostnames, it will be left unchanged.