GithubHelp home page GithubHelp logo

llamashoes / cinch-plugins Goto Github PK

View Code? Open in Web Editor NEW

This project forked from quintus/cinch-plugins

0.0 3.0 0.0 341 KB

A collection of Plugins for the Cinch IRC bot.

License: GNU Lesser General Public License v3.0

cinch-plugins's Introduction

Plugin collection for Cinch

This repository contains a number of probably useful plugins for the Cinch IRC bot, the best IRC bot library that ever has been written (at least in Ruby).

Usage

Currently the plugins are not available via RubyGems, but this will follow soon I guess. In the meantime, download the plugin files directly from GitHub (or clone the Git repository), place them inside a directory plugins/ and require them via Ruby’s normal require_relative mechanism. A minimal IRC bot utilising the Fifo plugin may look like this:

require "cinch"
require_relative "plugins/fifo"

cinch = Cinch::Bot.new do
  configure do |config|
    config.server = "irc.freenode.net"
    config.channels = ["#cinch-bots"]
    config.nick = "fifo-cinch"
    config.plugins.plugins = [Cinch::Fifo]

    config.plugins.options[Cinch::Fifo] = {
      :path => "/tmp/myfifo",
      :mode => 0666
    }
  end

  trap "SIGINT" do
    bot.quit
  end
end

cinch.start

As long as this bot runs, everything any program writes to the pipe at /tmp/myfifo will be echoed to the IRC channel #cinch-bots on irc.freenode.net.

List of plugins

This repository currently provides the following plugins:

Echo : Makes Cinch echo messages.

Fifo : Opens a FIFO which echoes everything written to it into IRC.

GithubCommits : Uses the HttpServer plugin to create a listener for GitHub’s post-commit webhook that pastes freshly pushed commits into IRC.

History : Ever joined a channel in the middle of a discussion and couldn't follow? This plugin is for you: It enables Cinch to replay a limited number of messages, solely for you.

HttpServer : Adds a HTTP server facility to cinch, using Sinatra and Thin. This plugin is not meant to be used standalone, but you can built your own request-accepting plugins on top of it.

LinkInfo : When Cinch spots a link, he follows it and pastes the returned HTML’s title and description meta tags into the channel.

Logging : A plugin for creating message-only logfiles you can publish somewhere.

PidFile : Allows you to create a PID file for your Cinch process.

Self : This is not a plugin, but rather a helper for writing plugins that make Cinch understand messages with start by Cinch’s nickname followed by a colon. See the Echo plugin’s code for a simple example using the ::recognize method provided by this helper.

Many plugins are highly configurable, so you really want to check out each plugin’s documentation at the top of the respective plugin file.

License

All Cinch plugins found in this repository are licensed under the GNU Lesser General Public License version 3 or later, except where otherwise noted in the respective plugin’s file. See COPYING for the full GPL license text, COPYING.LESSER for the LGPL license text, and each plugin file for a short per-plugin copyright statement.

cinch-plugins's People

Contributors

quintus avatar joeframbach avatar onewheelskyward avatar

Watchers

James Cloos avatar Ryan Gifford avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.