Mercurial > irccd
changeset 1019:90eb31112a53
man: update plugin documentation
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 21 Feb 2021 20:42:17 +0100 |
parents | cf99df45cb84 |
children | 3dec26654d06 |
files | plugins/ask/ask.7 plugins/auth/auth.7 plugins/hangman/hangman.7 plugins/history/history.7 plugins/joke/joke.7 plugins/links/links.7 plugins/logger/logger.7 plugins/plugin/plugin.7 plugins/roulette/roulette.7 plugins/tictactoe/tictactoe.7 |
diffstat | 10 files changed, 153 insertions(+), 153 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/ask/ask.7 Sun Feb 21 20:20:19 2021 +0100 +++ b/plugins/ask/ask.7 Sun Feb 21 20:42:17 2021 +0100 @@ -30,12 +30,12 @@ .Sh INSTALLATION The plugin .Nm -is distributed with irccd. To enable it add the following to your plugins -section: +is distributed with irccd. To enable it add it into your +.Xr irccd.conf 5 +configuration file. .Pp -.Bd -literal -[plugins] -ask = "" +.Bd -literal -offset indent +plugin "ask" .Ed .\" USAGE .Sh USAGE
--- a/plugins/auth/auth.7 Sun Feb 21 20:20:19 2021 +0100 +++ b/plugins/auth/auth.7 Sun Feb 21 20:42:17 2021 +0100 @@ -29,53 +29,58 @@ For the moment, .Nm auth supports the following backends: -.Bl -tag -width 12n -offset Ds +.Bl -tag -width nickserv .It nickserv the NickServ service, using /msg NickServ identify user pass .It quakenet the quakenet.org service, using /msg Q@CServe.quakenet.org AUTH user pass +.El .\" INSTALLATION .Sh INSTALLATION The plugin .Nm -is distributed with irccd. To enable it add the following to your plugins -section: +is distributed with irccd. To enable it add it into your +.Xr irccd.conf 5 +configuration file. .Pp -.Bd -literal -[plugins] -auth = "" +.Bd -literal -offset indent +plugin "auth" .Ed .\" USAGE .Sh USAGE You must configure the file to enable authentication. .\" CONFIGURATION .Sh CONFIGURATION -In your irccd.conf file, add the -.Va [plugin.auth] -section and fill with the following parameters: -.Bl -tag -width 24n +The plugin +.Nm +support the following configuration properties: +.Bl -tag -width "server.password (string)" .It Va server.type No (string) -must be +Must be .Em nickserv or .Em quakenet . .It Va server.password No (string) -the password. +The password. .It Va server.username No (string) -the username to use. Required for quakenet, optional for nickserv. +The username to use. Required for quakenet, optional for nickserv. .El .Pp -Note: you must replace server with one defined in a -.Va [server] -section. +Note: you must replace server prefix with the server identifier you refer to in +the +.Xr irccd.conf 5 +file. .Pp Example of configuration: -.Bd -literal -offset Ds -[plugin.auth] -freenode.type = "nickserv" -freenode.password = "mysecretpassword" -freenode.username = "jeanfrancois" +.Bd -literal +plugin "auth" { + config { + "freenode.type" "nickserv"; + "freenode.password" "mysecretpassword"; + "freenode.username" "jeanfrancois"; -wanadoo.type = "nickserv" -wanadoo.password = "wanadoo is dead" + "wanadoo.type" "nickserv"; + "wanadoo.password" "wanadoo is dead"; + } +} .Ed
--- a/plugins/hangman/hangman.7 Sun Feb 21 20:20:19 2021 +0100 +++ b/plugins/hangman/hangman.7 Sun Feb 21 20:42:17 2021 +0100 @@ -29,25 +29,25 @@ .Sh INSTALLATION The plugin .Nm -is distributed with irccd. To enable it add the following to your plugins -section: +is distributed with irccd. To enable it add it into your +.Xr irccd.conf 5 +configuration file. .Pp -.Bd -literal -[plugins] -hangman = "" +.Bd -literal -offset indent +plugin "hangman" .Ed .\" USAGE .Sh USAGE The .Nm plugin starts when a user execute its special command with no arguments. -.Bd -literal -offset Ds +.Bd -literal -offset indent markand: !hangman irccd: markand, the game is started, the word to find is: _ _ _ _ _ _ _ _ _ _ _ .Ed .Pp If a game is already running, the same command shows the current word. -.Bd -literal -offset Ds +.Bd -literal -offset indent markand: !hangman irccd: markand, the game is already running and the word is: s _ _, .Ed @@ -74,10 +74,10 @@ .Ed .\" CONFIGURATION .Sh CONFIGURATION -The following options are available under the -.Va [plugin.hangman] -section: -.Bl -tag -width 20n -offset Ds +The plugin +.Nm +support the following configuration properties: +.Bl -tag -width "collaborative (bool)" .It Va file No (string) The path to the database file. .Pp @@ -98,12 +98,10 @@ .El .\" TEMPLATES .Sh TEMPLATES -The +The plugin .Nm -plugin supports the following templates in -.Va [templates.hangman] -section: -.Bl -tag -width 22n -offset Ds +support the following template properties: +.Bl -tag -width wrong-letter .It Va asked When a letter has been already asked but present in the word. Keywords: .Em letter . @@ -136,12 +134,16 @@ .Sh EXAMPLES Example of configuration file: .Bd -literal -[plugin.hangman] -file = "/var/srv/db/words.txt" +plugin "hangman" { + config { + file "/var/srv/db/words.txt"; + } -[templates.hangman] -win = "nice job, the word was #{word}!" -wrong-letter = "please try again, there is no #{letter}" + templates { + win "nice job, the word was #{word}!"; + wrong-letter "please try again, there is no #{letter}"; + } +} .Ed .\" SEE ALSO .Sh SEE ALSO
--- a/plugins/history/history.7 Sun Feb 21 20:20:19 2021 +0100 +++ b/plugins/history/history.7 Sun Feb 21 20:42:17 2021 +0100 @@ -31,12 +31,12 @@ .Sh INSTALLATION The plugin .Nm -is distributed with irccd. To enable it add the following to your plugins -section: +is distributed with irccd. To enable it add it into your +.Xr irccd.conf 5 +configuration file. .Pp -.Bd -literal -[plugins] -history = "" +.Bd -literal -offset indent +plugin "history" .Ed .\" USAGE .Sh USAGE @@ -68,22 +68,20 @@ .Ed .\" CONFIGURATION .Sh CONFIGURATION -The following options are available under the -.Va [plugin.history] -section: -.Bl -tag -width 14n -offset Ds +The plugin +.Nm +support the following configuration properties: +.Bl -tag -width "file (string)" .It Va file No (string) path to the JSON file for saving information (Optional. default to cache directory). .El .\" TEMPLATES .Sh TEMPLATES -The +The plugin .Nm -plugin supports the following templates in -.Va [templates.history] -section: -.Bl -tag -width 14n -offset Ds +support the following template properties: +.Bl -tag -width unknown .It Va error Template when an internal error occured. Keywords: .It Va seen @@ -105,8 +103,11 @@ .Sh EXAMPLES Example of configuration file: .Bd -literal -[templates.history] -seen = "#{target} has been seen on #{channel} the last time on: %d/%m/%Y %H:%M" +plugin "history" { + templates { + "seen" "#{target} has been seen on #{channel} the last time on: %d/%m/%Y %H:%M"; + } +} .Ed .\" SEE ALSO .Sh SEE ALSO
--- a/plugins/joke/joke.7 Sun Feb 21 20:20:19 2021 +0100 +++ b/plugins/joke/joke.7 Sun Feb 21 20:42:17 2021 +0100 @@ -33,12 +33,12 @@ .Sh INSTALLATION The plugin .Nm -is distributed with irccd. To enable it add the following to your plugins -section: +is distributed with irccd. To enable it add it into your +.Xr irccd.conf 5 +configuration file. .Pp -.Bd -literal -[plugins] -joke = "" +.Bd -literal -offset indent +plugin "joke" .Ed .\" USAGE .Sh USAGE @@ -48,7 +48,7 @@ array of array of strings. .Pp Example of jokes.json file: -.Bd -literal -offset Ds +.Bd -literal [ [ "Tip to generate a good random password:", @@ -73,26 +73,28 @@ .Ed .\" CONFIGURATION .Sh CONFIGURATION -The following options are available under the -.Va [plugin.joke] -section: -.Bl -tag -width 14n -offset Ds +The plugin +.Nm +support the following configuration properties: +.Bl -tag -width "file (string)" .It Va file No (string) path to the JSON jokes files (Optional: defaults to data directory/jokes.json). Keywords: .Em channel , server .Pp -Warning: if you use keywords in the **file** parameter, you won't have a default +Warning: if you use keywords in the +.Va file +parameter, you won't have a default joke database anymore. .El .\" TEMPLATES .Sh TEMPLATES The .Nm -plugin supports the following templates in -.Va [templates.joke] -section: -.Bl -tag -width 14n -offset Ds +The plugin +.Nm +support the following template properties: +.Bl -tag -width error .It Va error Template when an internal error occured. Keywords: .Em channel , command , nickname , origin , plugin , server .
--- a/plugins/links/links.7 Sun Feb 21 20:20:19 2021 +0100 +++ b/plugins/links/links.7 Sun Feb 21 20:42:17 2021 +0100 @@ -30,12 +30,12 @@ .Sh INSTALLATION The plugin .Nm -is distributed with irccd. To enable it add the following to your plugins -section: +is distributed with irccd. To enable it add it into your +.Xr irccd.conf 5 +configuration file. .Pp -.Bd -literal -[plugins] -links = "" +.Bd -literal -offset indent +plugin "links" .Ed .\" USAGE .Sh USAGE @@ -47,23 +47,12 @@ markand: http://example.org irccd: Example Domain .Ed -.\" CONFIGURATION -.Sh CONFIGURATION -The following options are available under the -.Va [plugin.links] -section: -.Bl -tag -width 14n -offset Ds -.It Va timeout No (int) -Timeout in seconds before dropping a request (default: 30). -.El .\" TEMPLATES .Sh TEMPLATES -The +The plugin .Nm -plugin supports the following templates in -.Va [templates.links] -section: -.Bl -tag -width 14n -offset Ds +support the following template properties: +.Bl -tag -width info .It Va info Message to be written when title has been retrieved successfully. Keywords: .Em channel , nickname , origin , server , title .
--- a/plugins/logger/logger.7 Sun Feb 21 20:20:19 2021 +0100 +++ b/plugins/logger/logger.7 Sun Feb 21 20:42:17 2021 +0100 @@ -47,12 +47,12 @@ .Sh INSTALLATION The plugin .Nm -is distributed with irccd. To enable it add the following to your plugins -section: +is distributed with irccd. To enable it add it into your +.Xr irccd.conf 5 +configuration file. .Pp -.Bd -literal -[plugins] -logger = "" +.Bd -literal -offset indent +plugin "logger" .Ed .\" USAGE .Sh USAGE @@ -61,22 +61,20 @@ plugin has no direct commands. .\" CONFIGURATION .Sh CONFIGURATION -The following options are available under the -.Va [plugin.logger] -section: -.Bl -tag -width 14n -offset Ds +The plugin +.Nm +support the following configuration properties: +.Bl -tag -width "file (string)" .It Va file No (string) The path to the file where to store logs. Keywords: .Em channel , server , (date) . .El .\" TEMPLATES .Sh TEMPLATES -The +The plugin .Nm -plugin supports the following templates in -.Va [templates.logger] -section: -.Bl -tag -width 14n -offset Ds +support the following template properties: +.Bl -tag -width message .It Va join Format when someone joins a channel. .It Va kick @@ -108,11 +106,15 @@ .Sh EXAMPLES Example of configuration file: .Bd -literal -[plugin.logger] -file = "/var/log/irccd/#{server}/%y/%m/%d/#{channel}.txt" +plugin "logger" { + config { + "file" "/var/log/irccd/#{server}/%y/%m/%d/#{channel}.txt"; + } -[templates.logger] -join = "user #{nickname} joined #{channel}" + templates { + "join" "user #{nickname} joined #{channel}"; + } +} .Ed .\" SEE ALSO .Sh SEE ALSO
--- a/plugins/plugin/plugin.7 Sun Feb 21 20:20:19 2021 +0100 +++ b/plugins/plugin/plugin.7 Sun Feb 21 20:42:17 2021 +0100 @@ -29,12 +29,12 @@ .Sh INSTALLATION The plugin .Nm -is distributed with irccd. To enable it add the following to your plugins -section: +is distributed with irccd. To enable it add it into your +.Xr irccd.conf 5 +configuration file. .Pp -.Bd -literal -[plugins] -plugin = "" +.Bd -literal -offset indent +plugin "plugin" .Ed .\" USAGE .Sh USAGE @@ -60,24 +60,23 @@ Both commands work in a channel or as private message with irccd. .\" CONFIGURATION .Sh CONFIGURATION -The following options are available under the -.Va [plugin.plugin] -section: -.Bl -tag -width 22n -offset Ds +The plugin +.Nm +support the following configuration properties: +.Bl -tag -width "max-list-columns (int)" .It Va max-list-lines No (int) max number of lines allowed for the .Ar list sub command (Optional, default: 3). .It Va max-list-columns No (int) max number of columns allowed per lines (Optional, default: 80). +.El .\" TEMPLATES .Sh TEMPLATES -The +The plugin .Nm -plugin supports the following templates in -.Va [templates.plugin] -section: -.Bl -tag -width 14n -offset Ds +support the following templates properties: +.Bl -tag -width not-found .It Va usage Message to show on invalid usage. .It Va info
--- a/plugins/roulette/roulette.7 Sun Feb 21 20:20:19 2021 +0100 +++ b/plugins/roulette/roulette.7 Sun Feb 21 20:42:17 2021 +0100 @@ -33,12 +33,12 @@ .Sh INSTALLATION The plugin .Nm -is distributed with irccd. To enable it add the following to your plugins -section: +is distributed with irccd. To enable it add it into your +.Xr irccd.conf 5 +configuration file. .Pp -.Bd -literal -[plugins] -roulette = "" +.Bd -literal -offset indent +plugin "roulette" .Ed .\" USAGE .Sh USAGE @@ -55,12 +55,10 @@ .Ed .\" TEMPLATES .Sh TEMPLATES -The +The plugin .Nm -plugin supports the following templates in -.Va [templates.hangman] -section: -.Bl -tag -width 8n -offset Ds +support the following templates properties: +.Bl -tag -width lucky .It Va lucky The text to show on luck. Keywords: .Em count @@ -75,9 +73,12 @@ .Sh EXAMPLES Example of configuration file: .Bd -literal -[templates.roulette] -lucky = "#{nickname} you're gonna get shot" -shot = "BIM" +plugin "roulette" { + templates { + lucky "#{nickname} you're gonna get shot"; + shot "BIM"; + } +} .Ed .\" SEE ALSO .Sh SEE ALSO
--- a/plugins/tictactoe/tictactoe.7 Sun Feb 21 20:20:19 2021 +0100 +++ b/plugins/tictactoe/tictactoe.7 Sun Feb 21 20:42:17 2021 +0100 @@ -29,13 +29,12 @@ Warning: this plugin is extremely verbose, don't enable it blindly. .\" INSTALLATION .Sh INSTALLATION -The plugin -.Nm -is distributed with irccd. To enable it add the following to your plugins -section: +is distributed with irccd. To enable it add it into your +.Xr irccd.conf 5 +configuration file. .Pp -.Bd -literal -plugin tictactoe +.Bd -literal -offset indent +plugin "tictactoe" .Ed .\" USAGE .Sh USAGE @@ -94,10 +93,10 @@ .Ed .\" TEMPLATES .Sh TEMPLATES -The +The plugin .Nm -plugin supports the following templates: -.Bl -tag -width 8n -offset Ds +support the following templates properties: +.Bl -tag -width running .It Va draw When the game ended with no winner. .It Va invalid