Setting up an action
To view the list of Actions, open the Actions panel with cmd-N. The leftmost
column contains a checkmark that can be clicked to activate or deactivate the
Action. Each action is listed with a descriptive text to allow you to easily
see what each action does.
Press the Add button to open a dialog to set up an Action.
Events
The events that you can automatically respond to are:
- On any normal message
- On channel message
- On private message
- On notice
- On server notice
- On signon
- On signoff
- On join
- On join by self
- On opping
- On deopping
- On DCC chat offer
- On DCC filetransfer offer
- On DCC filetransfer done
- On DCC filetransfer fail
Event parameters
The parameter fields for the event support variable substitution. As explained on the previos page that means that you can use the following variable in the event strings:
On any normal message
Someone sent a channel message, a private message, a notice or a server message
Parameters:
Nick - the nick that sent the message.
Message - the text of the message.
On channel message
Someone sent a message to the channel.
Parameters:
Channelname - the channel where message was sent.
Nick - the nick that sent the message.
Message - the text of the message.
On private message
Someone sent a private message to you.
Parameters:
Nick - the nick that sent the message.
Message - the text of the message.
Possible responses
On notice
Someone sent a notice message to you.
Parameters:
Nick - the nick that sent the message.
Message - the text of the notice.
On server notice
The server sent a notice to you.
Parameters:
Message - the text of the notice
On join
Someone joined the channel.
Parameters:
Channel name - the channel where the join happened.
Nick - the nick that just joined the channel.
On join by self
You joined a channel.
Parameters:
Channel name - the channel you just joined.
On opping
Someone was opped in the channel.
Parameters:
Channel name - the channel where the opping happened.
Nick - the nick that was just opped.
On deopping
Someone was deopped in the channel.
Parameters:
Channel name - the channel where the deopping happened.
Nick - the nick that was just deopped.
On signon
Someone from your contacts list on notify just signed on.
Parameters:
Nick - the nick that just signed on.
On signoff
Someone from your contacts list on notify just signed off.
Parameters:
Nick - the nick that just signed off.
On DCC chat offer
You received a DCC chat offer.
Parameters:
Nick - the nick that sent the offer.
On DCC filetransfer offer
You received a DCC filetransfer offer.
Parameters:
Nick - the nick that sent the offer.
Filename - the name of the file that is being offered.
On DCC filetransfer done
A DCC filetransfer completed successfully.
Parameters:
Nick - the nick that sent the file.
Filename - the name of the file that has been received.
On DCC filetransfer fail
A DCC filetransfer completed successfully.
Parameters:
Nick - the nick that sent the file.
Filename - the name of the file that could not be received.
Responses
Each event has a preset list of supported responses which are appropriate to
the event. If you find the need for a particular response that isn't currently
supported, please let me know.
These are all the supported responses:
- Send public message
- Send notice
- Send private message
- Send notice to
- Send private message to
- Do whois
- Run command
- Op
- Deop
- Voice
- Unvoice
- Deop and kick opping nick
- Op and kick deoppping nick
- Kick
- Ban
- Highlight
- Ignore
- Redirect to
- Speak message
- Speak string
- Play sound
- Accept chat
- Accept file
- Open file
Response parameters
The parameter fields for the responses support variable substitution. That means that you can use the following variables in the response strings:
- $nick
- $userhost
- $channel
- $message
- $filename
Example:
If you want to have a spoken notification whenever someone joins a channel you can set up an Action to speak a string. The parameter to the Speak string response would then be "$nick just joined $channel".

When Snak performs the response for this Action the $nick will
be replaced by the nick that just joined the channel and $channel
will be replaced by the channel name.
Not all variables make sense in all situations. In the above example, no message of any kind is involved in the the event, so if you were to use the $message variable in the string, nothing would happen.
Likewise with the $filename variable, which is only functional in conjunction with the DCC events.
For events where the $message variable is supported you can also use the substring variables. If the message that you want to act on is in a known format, and you are only interested in certain parts of it you can refer to the individual words with numeric variables.
If the message is "one two three four", $0 would be "one",
$1 is "two" etc. The numeric variables can be combined in a number
of ways:
- $n Where n is a non-negative number, expands to the nth argument.
- $n-m Where n and m are positive numbers, expands to the nth thru mth arguments
inclusive.
- $n- Where n is a positive number, expands from the nth argument to the end
of the argument list.
- $-m Where m is a positive number, expands from the beginning of the argument
list to the mth argument. This is the same as $0-m.
- $~ Expands to the last word on a line.
That means, for example that you can refer to the second and third word of
a message with "$1-2", and to the entire message, except for the first
two words with "$2-"
|