IRCCD-PLUGIN-HANGMAN(7) Miscellaneous Information Manual IRCCD-PLUGIN-HANGMAN(7)

hangman
irccd hangman plugin

The hangman plugin lets you play the hangman game on IRC.

The plugin hangman is distributed with irccd. To enable it add the following to your plugins section:
[plugins]
hangman = ""

The hangman plugin starts when a user execute its special command with no arguments.
markand: !hangman
irccd: markand, the game is started, the word to find is: _ _ _ _ _ _ _ _ _ _ _

If a game is already running, the same command shows the current word.

markand: !hangman
irccd: markand, the game is already running and the word is: s _ _,

There are two ways for proposing a response to the game. You can either just ask for a letter or for a whole word.

When asking a letter, the message must be one letter.
markand: c
irccd: markand, nice! the word is now c _ _ _ _
jean: k
irccd: jean, there is no 'k'.

When asking by a word, just put one word as command argument. Note that in contrast to the letter proposal we have used command invocation rather than normal message to avoid possible propositions by mistake.
markand: !hangman couch
irccd: markand, this is not the word.
jean: !hangman candy
irccd: jean, congratulations, the word is candy.

The following options are available under the [plugin.hangman] section:
file (string)
The path to the database file.

The file must contains one word per line, it must be saved as UTF-8 and words must only contains UTF-8 characters, any other entry will be ignored.

Example:

sky
irccd
FreeBSD
door
cat
    
collaborative (bool)
Set to true to enable collaborative mode, a player can't propose two consecutives proposals (Optional, default: true).

The hangman plugin supports the following templates in [templates.hangman] section:
asked
When a letter has been already asked but present in the word. Keywords: letter.
dead
When the man was hung. Keywords: word.
found
When a correct letter has been placed. Keywords: word.
running
When a game is requested but it's already running. Keywords: word.
start
When the game starts. Keywords: word.
win
When the game succeeded. Keywords: word.
wrong-word
When a word proposal is wrong. Keywords: word.
wrong-letter
When a letter proposal is wrong. Keywords: letter.

All templates support the following standard keywords: channel, command, nickname, origin, plugin, server.

Example of configuration file:
[plugin.hangman]
file = "/var/srv/db/words.txt"

[templates.hangman]
win = "nice job, the word was #{word}!"
wrong-letter = "please try again, there is no #{letter}"

irccd(1), irccd-templates(7)
October 6, 2019 Linux 5.3.1-arch1-1-ARCH