No commit activity in last 3 years
No release in over 3 years
Implement the most important CTCP replies for Cinch bots
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.0
 Project Readme

Basic CTCP plugin

This plugin implements replies for the following CTCP commands:

  • CLIENTINFO
  • PING
  • SOURCE
  • TIME
  • VERSION

Installation

First install the gem by running: [sudo] gem install cinch-basic_ctcp

Then load it in your bot:

require "cinch"
require "cinch/plugins/basic_ctcp"

bot = Cinch::Bot.new do
  configure do |c|
    # add all required options here
    c.plugins.plugins = [Cinch::Plugins::BasicCTCP] # optionally add more plugins
  end
end

bot.start

Commands

None.

Options

:commands

If this option is set, the plugin will only reply to commands which are listed in this option.

Example configuration

configure do |c|
  # only reply to VERSION and TIME
  c.plugins.options[Cinch::Plugins::BasicCTCP][:commands] = [:version, :time]
end

:replies

This option is a hash table of custom responses to VERSION, SOURCE, and CLIENTINFO.

Example configuration

configure do |c|
  # send custom CTCP VERSION response
  c.plugins.options[Cinch::Plugins::BasicCTCP][:replies] = {
    :version => 'My robot v1.0'
  }
end