No commit activity in last 3 years
No release in over 3 years
An authentication system with multiple strategies for the Cinch IRC framework.
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

Cinch-authentication

An authentication system with multiple strategies for the Cinch IRC framework.

Features

  • Multiple strategies: users can be authenticated by their channel status, by being in a user list or by identifying with a password.
  • Easily configurable: authentication can be configured globally, on the plugin level and on the command level, all at the same time.

Usage

Cinch-authentication can be set up to require authorization for a full plugin

require 'cinch/extensions/authentication'

module Cinch::Plugins
  class Admin
    include Cinch::Plugin
    include Cinch::Extensions::Authentication

    enable_authentication # All matches require authorization.

    # ...
  end
end

Or only for a few commands.

require 'cinch/extensions/authentication'

module Cinch::Plugins
  class Admin
    include Cinch::Plugin
    include Cinch::Extensions::Authentication

    match /set_topic (.+)/s, :method => :set_topic
    match /get_topic/s, :method => :get_topic

    def set_topic(m, topic)
      return unless authenticated? m

      # ...
    end

    def get_topic(m)
      m.reply m.channel.topic
    end
  end
end

For more documenation on usage see the wiki. For more documentation on the API see rubydoc.org.

Installation

Rubygems

gem install cinch-authentication

Bundler

gem 'cinch-authentication', :require => 'cinch/extensions/authentication'

License

See the LICENSE file.