Skip to content

Instantly share code, notes, and snippets.

@TrainerGuy22
Created June 29, 2014 00:12
Show Gist options
  • Save TrainerGuy22/82c15dd8475e22d2d729 to your computer and use it in GitHub Desktop.
Save TrainerGuy22/82c15dd8475e22d2d729 to your computer and use it in GitHub Desktop.

server-redirect capability

This would create another IRC command, that would be sent from the party acting as the server (bouncer, server, etc...) to the client, and it's called REDIRECT.

REDIRECT server [create_new_server]

This will redirect the client to a new server, clarified with the server parameter. The create_new_server parameter is either YES or NO, YES if it's absent. If create_new_server is YES, the client will register a new persistent network to the server and load it. If it is NO, it will simply replace the current connection for the length of server's connection.

The REDIRECT command also has 4 tags: username, realname, nickname, and password.

These will provide for the credentials for the new server. If create_new_server is NO, then these flags shouldn't be sent. If they are, they are to be ignored.

Example (from a client viewpoint):

<-- CAP LS
--> CAP * LS server-redirect
--> @user=foo @realname=foo @nickname=foo REDIRECT irc.atheme.org
*configures a new persistent network for Athemenet with the provided tags, and starts the connection*
--> REDIRECT irc.freenode.org NO
*redirects the network to Freenode, for the duration of the connection*

Why?

  • For one, BNCs could benefit from the functionality. It could be used as an easy way to register your client with all the networks you have registered on your BNC user.
  • Servers could use the functionality as well. If a server was under heavy load, it could redirect you to another server with the command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment