diff --git a/docs/technical/writing-plugins.md b/docs/technical/writing-plugins.md index 95bb985..649fb0e 100644 --- a/docs/technical/writing-plugins.md +++ b/docs/technical/writing-plugins.md @@ -38,13 +38,10 @@ 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']` -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) +As of PyLink 1.2, there are two ways for a plugin to parse arguments: as a raw list of strings, or with `utils.IRCParser` (an [argparse](https://docs.python.org/3/library/argparse.html) wrapper). More information on using `utils.IRCParser()` can be found in the page ["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.