changeset 30:1ea775153cdc

Plugin hangman: various fixes in the documentation
author David Demelier <markand@malikania.fr>
date Mon, 22 Feb 2016 13:13:15 +0100
parents 3bf70400aa0b
children 50b7b5d287e8
files plugins/hangman/hangman.md
diffstat 1 files changed, 24 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/hangman/hangman.md	Mon Feb 22 13:03:33 2016 +0100
+++ b/plugins/hangman/hangman.md	Mon Feb 22 13:13:15 2016 +0100
@@ -18,7 +18,7 @@
 
 The **hangman** plugin starts when a user execute its special command with no arguments.
 
-````
+````nohighlight
 markand: !hangman
 irccd: markand, the game is started, the word to find is: _ _ _ _ _ _ _ _ _ _ _
 ````
@@ -29,43 +29,42 @@
 
 #### By letter
 
-When asking a letter, the message must just be one letter.
+When asking a letter, the message must be one letter.
 
 ````nohighlight
 markand: c
 irccd: markand, nice! the word is now c _ _ _ _
 jean: k
-irccd: markand, there is no 'k'.
+irccd: jean, there is no 'k'.
 ````
 
 #### By full word
 
-When asking by a word, just put one word as command.
+When asking by a word, just put one word as command argument.
 
 ````nohighlight
 markand: !hangman couch
 irccd: markand, this is not the word.
 jean: !hangman candy
-irccd: markand, congratulations, the word is candy.
+irccd: jean, congratulations, the word is candy.
 ````
 
 ## Configuration
 
-The **hangman** plugin can be configured to show different message and to specify a different database file. The default
-database file is **CONFDIR/plugin/hangman/words.conf**.
+The **hangman** plugin can be configured to show different messages.
 
 The following options are available under the `[plugin.hangman]` section:
 
+  - **file**: (string) the path to the database file (Optional, default: configuration directory),
   - **collaborative**: (bool) set to true to enable collaborative mode, a player can't propose two consecutives proposals (Optional, default: true),
-  - **file**: (string) the path to the database file,
-  - **format-asked**: (string) when a letter has been already asked but present in the word,
-  - **format-dead**: (string) when the man was hung,
-  - **format-found**: (string) when a correct letter has been placed,
-  - **format-running**: (string) when a game is requested but it's already running,
-  - **format-start**: (string) when the game starts,
-  - **format-win**: (string) when the game succeeded,
-  - **format-wrong-word**: (string) when a word proposal is wrong,
-  - **format-wrong-letter**: (string) when a letter proposal is wrong.
+  - **format-asked**: (string) when a letter has been already asked but present in the word (Optional),
+  - **format-dead**: (string) when the man was hung (Optional),
+  - **format-found**: (string) when a correct letter has been placed (Optional),
+  - **format-running**: (string) when a game is requested but it's already running (Optional),
+  - **format-start**: (string) when the game starts (Optional),
+  - **format-win**: (string) when the game succeeded (Optional),
+  - **format-wrong-word**: (string) when a word proposal is wrong (Optional),
+  - **format-wrong-letter**: (string) when a letter proposal is wrong (Optional).
 
 ### Keywords supported
 
@@ -84,20 +83,25 @@
 
 Example:
 
+<div class="panel panel-info">
+ <div class="panel-heading">~/.config/irccd/irccd.conf</div>
+ <div class="panel-body">
 ````ini
 [plugin.hangman]
 format-win = "nice job, the word was #{word}!"
 format-wrong-letter = "please try again, there is no #{letter}"
 ````
+ </div>
+</div>
 
 ## Database file
 
-The database file must contains one word per line.
+The database file must contains one word per line, it must be saved as UTF-8.
 
-Example:
-
+<div class="panel panel-info">
+ <div class="panel-heading">~/.config/irccd/plugin/hangman/words.conf</div>
+ <div class="panel-body">
 ````nohighlight
-$ cat ~/.config/irccd/plugin/hangman/words.conf
 sky
 irccd
 FreeBSD