petertseng / cinch-secret_fascists

cinch plugin allowing play-by-IRC of Secret Fascists
Apache License 2.0
0 stars 0 forks source link
bot game irc ruby secret-fascists

cinch-secret_fascists

This is an IRC bot using cinch, cinch-game-bot, and secret_fascists to allow play-by-IRC of "Secret Fascists" by Max Temkin:

https://boardgamegeek.com/boardgame/188834/

Build Status

The astute will note that this is not the actual name of the game. Fortunately, that does not really matter, as the name of the Fascist leader is configurable per game.

Setup

You'll need a recent version of Ruby. Ruby 2.1 or newer is required because of required keyword arguments. The build status will confirm compatibility with various Ruby versions. Note that 2.1 is in security maintenance mode, so it would be better to use a later version.

You'll need to install the required gems, which can be done automatically via bundle install, or manually by reading the Gemfile and using gem install on each gem listed.

Usage

Given that you have performed the requisite setup, the minimal code to get a working bot might resemble:

require 'cinch'
require 'cinch/plugins/secret_fascists'

bot = Cinch::Bot.new do
  configure do |c|
    c.nick            = 'SecretFascistsBot'
    c.server          = 'irc.example.org'
    c.channels        = ['#playsecretfascists']
    c.plugins.plugins = [Cinch::Plugins::SecretFascists]
    c.plugins.options[Cinch::Plugins::SecretFascists] = {
      channels: ['#playsecretfascists'],
      settings: 'secretfascists-settings.yaml',
    }
  end
end

bot.start

Configuration

Along with the standard configuration options of cinch-game_bot, this plugin supports the following plugin-specific configuration options: