view plugins/roulette/roulette.md @ 780:560b62f6b0a7

Core: rework socket layer, closes #939 @6h Rework the ip_connector and ip_acceptor to be more easy to use. Also, ip_connector will now use a resolver to find appropriate endpoints. Bring back full support for IPv6/IPv4 with all possible combinations. The tls_stream class now owns a shared ssl::context that is copied from the acceptor or the connector. The tls_connector and tls_acceptor wraps basic ones for convenience and simplicity. Irccd and irccdctl now support local SSL sockets.
author David Demelier <markand@malikania.fr>
date Sun, 04 Nov 2018 17:26:05 +0100
parents c143682678b9
children ebe561276c33
line wrap: on
line source

---
title: "Roulette plugin"
header: "Roulette plugin"
guide: yes
---

The plugin **roulette** is a funny script that let you do a russian roulette game but without any injuries.

## Installation

The plugin **roulette** is distributed with irccd. To enable it add the following to your `plugins` section:

````ini
[plugins]
roulette = ""
````

## Usage

The plugin **roulette** just reacts to the special command.

Example:

````nohighlight
markand: !roulette
irccd: markand, you're lucky this time
markand: !roulette
irccd: markand, you're lucky this time
markand: !roulette
markand was kicked by irccd [markand, HEADSHOT]
````

## Configuration

The following options are available under the `[plugin.roulette]` section:

**Deprecated in irccd 2.1.0:**

  - **format-lucky**: Use `[format.roulette] lucky` instead,
  - **format-shot**: Use `[format.roulette] shot` instead,

## Formats

The **roulette** plugin supports the following formats in `[format.roulette]` section:

  - **lucky**: (string) the text to show on luck,
  - **shot**: (string) the text to show on shot.

### Keywords supported

The following keywords are supported:

| Format    | Keywords                                           | Notes                             |
|-----------|----------------------------------------------------|-----------------------------------|
| (any)     | channel, command, nickname, origin, plugin, server | all formats                       |
| **lucky** | count                                              | the number of cylinder count left |

Example:

<div class="panel panel-info">
 <div class="panel-heading">~/.config/irccd/irccd.conf</div>
 <div class="panel-body">
````ini
[format.roulette]
lucky = "#{nickname} you're gonna get shot"
shot = "BIM"
````
 </div>
</div>