kAjwn

Updated: April 02, 2004, 19:55

kAjwn (short for Auto join when nick) provides an easy solution when you want to join the same network twice under two different nicks and you want to join different channels for these on connect.

The syntax of the alias ajwn is very similar to join, but takes an additional parameter to determine if the joins should be executed. While ajwn can be used like any other command, it is only useful in the networks perform settings.

Syntax

ajwn nick <channel>[,<channel>...] [<key>[,<key>...]]
Parameters:
nick:
The nickname for which the command should join the channels. A regular expression to take care of nick variations and because of this, the characters ()[]{}/\-*+?! have to be escaped with a single \.
channel:
The name of the channel to join.
key:
The channel key if mode +k is set.
ajwns nick <channel>[,<channel>...] [<key>[,<key>...]]

The simple version of ajwn which does not expect a regular expression for the nick name.

Parameters:
nick:
The nickname for which the command should join the channels.
channel:
The name of the channel to join.
key:
The channel key if mode +k is set.
ecwn nick <command>

Executes the command when the current nick matches the parameter.

Parameters:
nick:
The nickname for which the command should join the channels. A regular expression to take care of nick variations and because of this, the characters ()[]{}/\-*+?! have to be escaped with a single \.
command:
The name of the command to execute.
ecwns nick <command>

The simple version of ecwn.

Parameters:
nick:
The nickname for which the command should join the channels.
command:
The name of the command to execute.

Sample

First, open the Options and select Setup. Add the nicknames you want to use to the Nicknames in order of preference list box. In this sample they are Boki and Ikob. Than select Connection, click On Connect... and select Perform. In the On connect to <network>, perform: text field enter ajwn nick1 #chan1,#chan2 and ajwn nick2 #chan3,#chan4, with nick1 and nick2 being the previous entered nicks. For this sample the following lines have been entered:

ajwn Boki.* #BokisChan
ajwn Ikob.* #IkobsChan

Even though the .* are not needed, they have been added to demonstrate the possible usage of RegExp's.

Making nicknames RegExp save

Because the nick parameter is a RegExp, nicknames in the form of [abc|nick] need special treatment. Making this nickname RegExp save results in \[abc\|nick\] as nick parameter for ajwn.