Mercurial > irccd
comparison plugins/joke/joke.7 @ 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 |
comparison
equal
deleted
inserted
replaced
1018:cf99df45cb84 | 1019:90eb31112a53 |
---|---|
31 invoked. | 31 invoked. |
32 .\" INSTALLATION | 32 .\" INSTALLATION |
33 .Sh INSTALLATION | 33 .Sh INSTALLATION |
34 The plugin | 34 The plugin |
35 .Nm | 35 .Nm |
36 is distributed with irccd. To enable it add the following to your plugins | 36 is distributed with irccd. To enable it add it into your |
37 section: | 37 .Xr irccd.conf 5 |
38 configuration file. | |
38 .Pp | 39 .Pp |
39 .Bd -literal | 40 .Bd -literal -offset indent |
40 [plugins] | 41 plugin "joke" |
41 joke = "" | |
42 .Ed | 42 .Ed |
43 .\" USAGE | 43 .\" USAGE |
44 .Sh USAGE | 44 .Sh USAGE |
45 The | 45 The |
46 .Nm | 46 .Nm |
47 plugin requires a database of jokes file, it consists of a plain JSON file of | 47 plugin requires a database of jokes file, it consists of a plain JSON file of |
48 array of array of strings. | 48 array of array of strings. |
49 .Pp | 49 .Pp |
50 Example of jokes.json file: | 50 Example of jokes.json file: |
51 .Bd -literal -offset Ds | 51 .Bd -literal |
52 [ | 52 [ |
53 [ | 53 [ |
54 "Tip to generate a good random password:", | 54 "Tip to generate a good random password:", |
55 "Ask a Windows user to quit vim." | 55 "Ask a Windows user to quit vim." |
56 ], | 56 ], |
71 irccd: Tip to generate a good random password: | 71 irccd: Tip to generate a good random password: |
72 irccd: Ask a Windows user to quit vim. | 72 irccd: Ask a Windows user to quit vim. |
73 .Ed | 73 .Ed |
74 .\" CONFIGURATION | 74 .\" CONFIGURATION |
75 .Sh CONFIGURATION | 75 .Sh CONFIGURATION |
76 The following options are available under the | 76 The plugin |
77 .Va [plugin.joke] | 77 .Nm |
78 section: | 78 support the following configuration properties: |
79 .Bl -tag -width 14n -offset Ds | 79 .Bl -tag -width "file (string)" |
80 .It Va file No (string) | 80 .It Va file No (string) |
81 path to the JSON jokes files (Optional: defaults to data directory/jokes.json). | 81 path to the JSON jokes files (Optional: defaults to data directory/jokes.json). |
82 Keywords: | 82 Keywords: |
83 .Em channel , server | 83 .Em channel , server |
84 .Pp | 84 .Pp |
85 Warning: if you use keywords in the **file** parameter, you won't have a default | 85 Warning: if you use keywords in the |
86 .Va file | |
87 parameter, you won't have a default | |
86 joke database anymore. | 88 joke database anymore. |
87 .El | 89 .El |
88 .\" TEMPLATES | 90 .\" TEMPLATES |
89 .Sh TEMPLATES | 91 .Sh TEMPLATES |
90 The | 92 The |
91 .Nm | 93 .Nm |
92 plugin supports the following templates in | 94 The plugin |
93 .Va [templates.joke] | 95 .Nm |
94 section: | 96 support the following template properties: |
95 .Bl -tag -width 14n -offset Ds | 97 .Bl -tag -width error |
96 .It Va error | 98 .It Va error |
97 Template when an internal error occured. Keywords: | 99 Template when an internal error occured. Keywords: |
98 .Em channel , command , nickname , origin , plugin , server . | 100 .Em channel , command , nickname , origin , plugin , server . |
99 .El | 101 .El |
100 .\" SEE ALSO | 102 .\" SEE ALSO |