Difference between revisions of "Server"

From Scriptwiki
Jump to: navigation, search
(added +e in command syntax + -jn as in minimized channel window)
m
 
Line 54: Line 54:
  
 
== See Also ==
 
== See Also ==
Take a look at [[Quit|/quit]] to disconnect from a server or [[disconnect|/disconnect]] to force a disconnect from a server.
+
* [[Quit|/quit]] to disconnect from a server.
 +
* [[disconnect|/disconnect]] to force a disconnect from a server.
  
 
[[Category:Commands]]
 
[[Category:Commands]]

Latest revision as of 08:55, 2 July 2007

Connects you to a server.

/server [-mnesarpfoc] <server/groupname> [port] [password] [-i nick anick email name] 
 [-jn #channel pass]

If you do not specify any parameters, mIRC will connect to the last server you have used. If you use the server command while still connected, you will be disconnected with your normal quit message and then connect to the specified server.

You could also use /server N which connects to the Nth server in the server list in the connect dialog or /server <groupname> which will cycle through all the servers in the server list which have that group name until it connects to one of them.

Using the -m switch creates a new server window for that connection and connects to the server. The -n switch does the same without connecting to the server.

To initiate a secure connection to an SSL capable server, you can use the -e switch, or prefix the port number with a plus sign, eg. +7001.

Using the -j switch will make you join the given channel directly after connecting to the server. If you additionally specify the n flag (-jn), it will join the given channel and minimize the channel window.

You can additionally define your nickname, alternative nickname, email address and realname using the -i switch. These which will be used for the new connection.

The -pfoc switches have a preventing character:

  • -p perform
  • -f popup favorites folder
  • -o autojoin channels
  • -c on connect event

Note that the default port is the one you have specified in your mIRC option dialog.

If you specify any of the -sar switches, the format of the command changes to:

/server -sar [server] [-p port] [-g group] [-w password] [-d description]

The switches stand for:

  • -s sorts the servers list
  • -a adds a server. If it exists, it is updated
  • -r removes a server

mIRC tries to find a match for either the server address or the description in the existing servers list.

Note that you can also specify nothing for -g, -w or -d to clear the current setting.

Example

server irc.quakenet.org

This example will just connect to QuakeNet after disconnecting your current session.


server -m irc.quakenet.org -i foobar foobar_ foo@bar.com foobar -j #help.script

This one will make you connect to QuakeNet with nickname foobar, alternative nickname foobar_, email address foo@bar.com and realname foobar. After that, you will automatically join #help.script.


In combination with the On start event, you can connect to multiple server when you open your mIRC:

on *:START: {
 ; lets connect to the first server. We dont need the -m switch here.
 server irc.quakenet.org 
 ; here we connect to the second server. We do need the -m switch as else, it will disconnect our first connection.
 server -m my.private-network.com mysecretkey 
} 

See Also

  • /quit to disconnect from a server.
  • /disconnect to force a disconnect from a server.