]> arthur.barton.de Git - ngircd-alex.git/commit
Implement Help() function parsing and returning the help text
authorAlexander Barton <alex@barton.de>
Tue, 1 Jan 2013 13:57:03 +0000 (14:57 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 1 Jan 2013 13:57:03 +0000 (14:57 +0100)
commit289a26e9e43be303a7355ab530ddcaa84aca60b9
treea1babd4f3caeee9017b09fe455685326d08ed6fb
parentd2a1f6aa4be7e42dd76e5342b309b8331d86bab4
Implement Help() function parsing and returning the help text

This function parses the already read in help text and sends the requested
portions to the user. Parsing is done as following when a user user
issues a "HELP <cmd>" command:

 1. Search the file for a line "- <cmd>",
 2. Output all subsequent lines that start with a TAB (ASCII 9) character
    to the client using NOTICE commands, treat lines containing a single "."
    after the TAB as empty lines.
 3. Break at the first line not starting with a TAB character.

This format allows to have information to each command stored in this file
which will not be sent to an IRC user requesting help which enables us to
have additional annotations stored here which further describe the origin,
implementation details, or limits of the specific command.

A special "Intro" block is returned to the user when the HELP command is
used without a command name.
src/ngircd/irc.c