Mercurial > irccd
comparison plugins/hangman/hangman.7 @ 845:00a4720c4874
doc: rewrite documentation in manual pages, closes #1674
Get rid of markdown documentation and the custom generator tools, instead use
raw manual pages.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 08 Jul 2019 16:15:57 +0200 |
parents | |
children | 5e25439fe98d |
comparison
equal
deleted
inserted
replaced
844:dc6b42d7b97a | 845:00a4720c4874 |
---|---|
1 .\" | |
2 .\" Copyright (c) 2013-2019 David Demelier <markand@malikania.fr> | |
3 .\" | |
4 .\" Permission to use, copy, modify, and/or distribute this software for any | |
5 .\" purpose with or without fee is hereby granted, provided that the above | |
6 .\" copyright notice and this permission notice appear in all copies. | |
7 .\" | |
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
15 .\" | |
16 .Dd @IRCCD_MAN_DATE@ | |
17 .Dt IRCCD-PLUGIN-HANGMAN 7 | |
18 .Os | |
19 .\" NAME | |
20 .Sh NAME | |
21 .Nm hangman | |
22 .Nd irccd hangman plugin | |
23 .\" DESCRIPTION | |
24 .Sh DESCRIPTION | |
25 The | |
26 .Nm | |
27 plugin lets you play the hangman game on IRC. | |
28 .\" INSTALLATION | |
29 .Sh INSTALLATION | |
30 The plugin | |
31 .Nm | |
32 is distributed with irccd. To enable it add the following to your plugins | |
33 section: | |
34 .Pp | |
35 .Bd -literal | |
36 [plugins] | |
37 hangman = "" | |
38 .Ed | |
39 .\" USAGE | |
40 .Sh USAGE | |
41 The | |
42 .Nm | |
43 plugin starts when a user execute its special command with no arguments. | |
44 .Bd -literal -offset Ds | |
45 markand: !hangman | |
46 irccd: markand, the game is started, the word to find is: _ _ _ _ _ _ _ _ _ _ _ | |
47 .Ed | |
48 .Pp | |
49 If a game is already running, the same command shows the current word. | |
50 .Bd -literal -offset Ds | |
51 markand: !hangman | |
52 irccd: markand, the game is already running and the word is: s _ _, | |
53 .Ed | |
54 .Pp | |
55 There are two ways for proposing a response to the game. You can either just ask | |
56 for a letter or for a whole word. | |
57 .Ss By letter | |
58 When asking a letter, the message must be one letter. | |
59 .Bd -literal -offset Ds | |
60 markand: c | |
61 irccd: markand, nice! the word is now c _ _ _ _ | |
62 jean: k | |
63 irccd: jean, there is no 'k'. | |
64 .Ed | |
65 .Ss By full word | |
66 When asking by a word, just put one word as command argument. Note that in | |
67 contrast to the letter proposal we have used command invocation rather than | |
68 normal message to avoid possible propositions by mistake. | |
69 .Bd -literal -offset Ds | |
70 markand: !hangman couch | |
71 irccd: markand, this is not the word. | |
72 jean: !hangman candy | |
73 irccd: jean, congratulations, the word is candy. | |
74 .Ed | |
75 .\" CONFIGURATION | |
76 .Sh CONFIGURATION | |
77 The following options are available under the | |
78 .Va [plugin.hangman] | |
79 section: | |
80 .Bl -tag -width 20n -offset Ds | |
81 .It Va file No (string) | |
82 The path to the database file. | |
83 .Pp | |
84 The file must contains one word per line, it must be saved as UTF-8 and words | |
85 must only contains UTF-8 characters, any other entry will be ignored. | |
86 .Pp | |
87 Example: | |
88 .Bd -literal -offset Ds | |
89 sky | |
90 irccd | |
91 FreeBSD | |
92 door | |
93 cat | |
94 .Ed | |
95 .It Va collaborative No (bool) | |
96 Set to true to enable collaborative mode, a player can't propose two | |
97 consecutives proposals (Optional, default: true). | |
98 .El | |
99 .\" TEMPLATES | |
100 .Sh TEMPLATES | |
101 The | |
102 .Nm | |
103 plugin supports the following templates in | |
104 .Va [templates.hangman] | |
105 section: | |
106 .Bl -tag -width 22n -offset Ds | |
107 .It Va asked | |
108 When a letter has been already asked but present in the word. Keywords: | |
109 .Em letter . | |
110 .It Va dead | |
111 When the man was hung. Keywords: | |
112 .Em word . | |
113 .It Va found | |
114 When a correct letter has been placed. Keywords: | |
115 .Em word . | |
116 .It Va running | |
117 When a game is requested but it's already running. Keywords: | |
118 .Em word . | |
119 .It Va start | |
120 When the game starts. Keywords: | |
121 .Em word . | |
122 .It Va win | |
123 When the game succeeded. Keywords: | |
124 .Em word . | |
125 .It Va wrong-word | |
126 When a word proposal is wrong. Keywords: | |
127 .Em word . | |
128 .It Va wrong-letter | |
129 When a letter proposal is wrong. Keywords: | |
130 .Em letter . | |
131 .El | |
132 .Pp | |
133 All templates support the following standard keywords: | |
134 .Em channel , command , nickname , origin , plugin , server . | |
135 .\" EXAMPLES | |
136 .Sh EXAMPLES | |
137 Example of configuration file: | |
138 .Bd -literal | |
139 [plugin.hangman] | |
140 file = "/var/srv/db/words.txt" | |
141 | |
142 [templates.hangman] | |
143 win = "nice job, the word was #{word}!" | |
144 wrong-letter = "please try again, there is no #{letter}" | |
145 .Ed | |
146 .\" SEE ALSO | |
147 .Sh SEE ALSO | |
148 .Xr irccd 1 , | |
149 .Xr irccd-templates 7 |