From ed7a117247deb676fb312e84a7129b454fca5f38 Mon Sep 17 00:00:00 2001 From: Ken Spencer Date: Sun, 12 Mar 2017 21:55:22 -0400 Subject: [PATCH] doc/technical/writing-plugins.md: mention and link to using-ircparser.md --- docs/technical/writing-plugins.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/technical/writing-plugins.md b/docs/technical/writing-plugins.md index b9b000b..95bb985 100644 --- a/docs/technical/writing-plugins.md +++ b/docs/technical/writing-plugins.md @@ -38,10 +38,13 @@ Each command function takes 3 arguments: `irc, source, args`. - **source**: The numeric of the sender. This will usually be a UID (for users) or a SID (for server). - **args**: A `list` of space-separated command arguments (excluding the command name) that the command was called with. For example, `/msg PyLink hello world 1234` would give an `args` list of `['world', '1234']` -(Unfortunately, this means that for now, any fancy argument parsing has to be done manually.) +With the inclusion of argparse. PyLink is able to parse arguments two ways. You can either use argparse and be really fancy with your argument parsing, or you can do your own parsing just by using the regular `args` list. +More information on using `utils.IRCParser()` can be found in +[using IRCParser](using-ircparser.md) Command handlers do not return anything and can raise exceptions, which are caught by the core and automatically return an error message. + ## Sending data to IRC Plugins receive data from the underlying protocol module, and communicate back using outgoing [command functions](pmodule-spec.md) implemented by the protocol module. They should *never* send raw data directly back to IRC, because that wouldn't be portable across different IRCds.