server
Connects to the specified server
Usage
server [switches] [<server:string> [<port:uint>]]
Description
Attempts a connection to the specified <server> on the specified <port>. If no <port> is specified the default 6667 is used. If no <server> is specified, the currently selected server from the server list is used unless the -l switch is passed: in this case the last server that was used in the IRC context is re-used. If the <server> is a valid IPv6 address, the -i switch is implied.
The <server> is added to the server list (if not already there) and set as current.

If <server> is in the form id:<some_string> then <some_string> is interpreted as the server's internal ID (specified in the options dialog). This is useful when you need to force KVIrc to choose between multiple server entries with the same hostname and port stored in the database.
Please note that this form causes most of the switches to have no effect since the entry in the database will override them. If no server entry with the specified identifier is found then an error will be generated and the connection attempt will stop.
If <server> doesn't seem to be a valid IP address or hostname (i.e. it contains no dots) and it doesn't look to be in the form id:<some_string> then it is assumed to be a network name and if such a network is found in the server list then the best server for that network is contacted. (KVIrc tries to guess the round-robin (random) servers first).
This behaviour can be forced by adding the net: prefix to the <server> (so it will work even if the network name contains a dot).

The connection is attempted in the current IRC context. If there is already a connection in progress then it is brutally terminated.
Switches
-b=<local address:string> | --bind-address=<local address:string>
Bind the outgoing connection to <local address>. The <local address> must be either the IP address of a local interface or a local interface name itself (e.g. eth0 under Linux, en0 under macOS etc.) suitable for contacting the remote <server>: this means that if you're going to use the -i switch, the <local address> must be an IPv6 address. If using a local interface name as <local address> (working on most, but not all systems), the KVIrc network engine will automatically detect the interface address (i.e. the default address of that interface).
-c=<command sequence:string> | --command=<command sequence:string>
The <command sequence> will be executed just after the login operations have been completed.
-f=<socket filter:string> | --filter=<socket filter:string>
Activates <socket filter> on the connection. A socket filter is a plugin that can adapt the IRC protocol to other existing protocols such as OpenNap. For plain IRC it is not needed.
-i | --ipv6
Connects to the <server> via the IPv6 protocol (if IPv6 support has been compiled in).
-n | --new-context
Forces the connection to be attempted in a new IRC context (server window) instead of the current one.
-m | --minimized
If a new console window is created (due to -n or -u) then create it as minimized.
-p=<password:string> | --password=<password:string>
Uses <password> to login to the server (the password will be stored in the server entry too).
-q=<nick:string> | --nickname=<nick:string>
Uses <nick> to login to the server (the nickname will be stored in the server entry too).
-s | --ssl
Activates the SSL support for this connection (if OpenSSL support has been compiled in). If SSL is enabled and no port is specified, the connection will be made to port 6697.
-u | --unused-context
Forces the connection to be attempted in the first IRC context that has no connection in progress. If all the IRC contexts have connections in progress then a new one is created.
-l | --last
When <server> and <port> are empty use the last ones used in the IRC context.
Examples

server irc.tin.it
server -i irc6.ircd.it
server -i ircd.stealth.net 6667
server irc.undernet.org 6665
server -n irc.openprojects.net
server -c="join #kvirc" irc.stealth.net 6665
server -b=ppp0 irc.tin.it
server undernet
server id:mybouncerwithusername1
server id:mybouncerwithusername2
server net:under.net

Index, Commands