Mercurial > irccd
diff doc/src/js/event/onCommand.md @ 817:ebe561276c33
doc: start reworking, continue #752 @8h
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 19 Nov 2018 07:04:42 +0100 |
parents | doc/src/api/event/onCommand.md@ebdc614db066 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/src/js/event/onCommand.md Mon Nov 19 07:04:42 2018 +0100 @@ -0,0 +1,20 @@ +# Event onCommand + +Special commands are not real IRC events. They are called from channel messages +with a specific syntax using a delimiter and the plugin name. + +For instance, with default irccd parameters, saying on a channel `!ask foo` will +call the special command of the plugin named **ask**. + +# Synopsis + +```javascript +function onCommand(server, origin, channel, message) +``` + +# Arguments + +- server: the current server, +- origin: who invoked the command, +- channel: the channel where the message comes from, +- message: the real message, without the ! part.