Mercurial > irccd
comparison doc/src/api/event/onCommand.md @ 614:ebdc614db066
Docs: get rid of metadata
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 17 Dec 2017 09:21:49 +0100 |
parents | bb9771fb5f44 |
children |
comparison
equal
deleted
inserted
replaced
613:0c7241258289 | 614:ebdc614db066 |
---|---|
1 --- | 1 # Event onCommand |
2 event: onCommand | |
3 js: true | |
4 summary: "Execute special command." | |
5 synopsis: "function onCommand(server, origin, channel, message)" | |
6 arguments: | |
7 - "**server**: the current server," | |
8 - "**origin**: who invoked the command," | |
9 - "**channel**: the channel where the message comes from," | |
10 - "**message**: the real message, without the ! part." | |
11 --- | |
12 | 2 |
13 Special commands are not real IRC events. They are called from channel messages with a specific syntax using a delimiter | 3 Special commands are not real IRC events. They are called from channel messages |
14 and the plugin name. | 4 with a specific syntax using a delimiter and the plugin name. |
15 | 5 |
16 For instance, with default irccd parameters, saying on a channel `!ask foo` will call the special command of the plugin | 6 For instance, with default irccd parameters, saying on a channel `!ask foo` will |
17 named **ask**. | 7 call the special command of the plugin named **ask**. |
8 | |
9 # Synopsis | |
10 | |
11 ```javascript | |
12 function onCommand(server, origin, channel, message) | |
13 ``` | |
14 | |
15 # Arguments | |
16 | |
17 - **server**: the current server, | |
18 - **origin**: who invoked the command, | |
19 - **channel**: the channel where the message comes from, | |
20 - **message**: the real message, without the ! part. |