GithubHelp home page GithubHelp logo

rawrbot's Introduction

Rawrbot - An IRC Bot

Build status

Rawrbot is an IRC bot written in Ruby which uses the Cinch framework (https://github.com/cinchrb/cinch).

Functionality comes from plugins loaded into the bot. Plugins can be written using Ruby and the Cinch API.

The original purpose of Rawrbot was to be a tool to assist Portland State University's Office of Information Technology Help Desk technicians. Many of the plugins I've written are specifically geared towards IT support and are only useful for that purpose. Other plugins are more generic or are simply for-fun.

Requirements:

Rawrbot itself requires

  • Ruby v2.2.4, and
  • The 'Cinch' Ruby gem.

Individual plugins have their own requirements, which are listed at the top of the plugin file.

Quick Start Guide:

  • Install RVM (https://rvm.io/)

  • Clone the Rawrbot Git repo.

    git clone https://github.com/pfaffle/Rawrbot.git

  • Change directories to the location where you cloned the bot.

    cd Rawrbot

  • Install a compatible Ruby

    rvm install 2.2.4

  • Install Bundler

    gem install bundler

  • Use Bundler to install the required gems.

    bundle install

  • Copy sample config files from the config/samples directory into the config/ directory, then edit them as desired.

    cp config/samples/config.yml config/config.yml

    vim config/config.yml

Samples are provided for the main Rawrbot config file and for each of the plugins. You must provide a general Rawrbot config file (config/config.yml). Other config files are only required if you intend to use the corresponding plugin.

  • Run the bot within screen or tmux.

    ./rawrbot.rb

Note that Rawrbot will run on Windows as well. The steps for setting it up are roughly the same, although you probably won't be using RVM as your Ruby version manager.

Contributing to Rawrbot:

Contributions are welcome! If you want to contribute to Rawrbot, please fork it and submit a pull request with your changes.

To create a new plugin, simply create a file with a name ending in .rb in the plugins/ directory which contains a Class that includes Cinch::Plugin. Use other plugins as examples to work from when creating a new plugin.

Add your plugin's Class name to the comma-separated list of plugins in config/config.yml if you want it to be automatically loaded when the bot starts.

For more details, consult the Cinch documentation (http://www.rubydoc.info/github/cinchrb/cinch/) and see more examples at Cinch's Github.com repo (https://github.com/cinchrb/cinch).

rawrbot's People

Contributors

benhurricane avatar blkperl avatar eyayron avatar maxmarchuk avatar nibalizer avatar pfaffle avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rawrbot's Issues

LDAP plugins need config file even if disabled

With the plugins set to [Social,Messenger,Karma,Learning,GoogleRSS], which should mean that no LDAP configs are needed, I get the following error:

~/Rawrbot/lib/ldap_helper.rb:18:in `read': No such file or directory - config/ldap.yml (Errno::ENOENT)
        from ~/Rawrbot/lib/ldap_helper.rb:18:in `initialize'
        from ~/Rawrbot/plugins/USSCATldap_plugin.rb:23:in `new'
        from ~/Rawrbot/plugins/USSCATldap_plugin.rb:23:in `<class:USSCATldap>'
        from ~/Rawrbot/plugins/USSCATldap_plugin.rb:15:in `<top (required)>'
        from ~/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `requ
ire'
        from ~/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `requ
ire'
        from ./rawrbot.rb:22:in `block in <main>'
        from ./rawrbot.rb:21:in `each'
        from ./rawrbot.rb:21:in `<main>'

Fix hardcoded prefix

Right now, the prefix '!' for commands is hardcoded in a number of different places (plugins). These instances need to be removed and made to use the prefix defined in the main Rawrbot config file.

Add support for an access control list for certain bot functions

Right now the bot just does whatever it is told, regardless of who is asking, as long as the command is valid. I would like to add some access controls for some of the functions (such as join/part, send message, etc.) so that only bot "admins" can tell the bot to use them.

The config file defines an array called "admins" which contains nicks of the people who should have access to more sensitive functions, but none of the plugins currently use that array to check if a user is authorized to perform those functions. This needs to be implemented.

When adding a Learning entry beginning with '|', don't prepend with 'or'.

When adding onto a learning entry something that begins with a pipe '|' character, rawrbot should not prepend the entry with 'or' like it does normally. That way, you can easily continue to build off an existing entry that is purely made up of pipe-separated values. Example of desired behavior:

<pfaffle> rawrbot: literal foo
<rawrbot> foo =is= thing1|thing2
<pfaffle> rawrbot: foo is |thing3
<rawrbot> OK, pfaffle.
<pfaffle> rawrbot: literal foo
<rawrbot> foo =is= thing1|thing2|thing3

Current behavior after adding 'thing3' to the entry is:

<rawrbot> foo =is= thing1|thing2 or |thing3

Improve Rawrbot's social skills

The Social plugin is currently pretty minimal and could be expanded. Some potential features to add include:

  • Ability to recognize more greetings/goodbyes.
  • Additional variety in responses.
  • Ability to recognize other kinds of common small talk questions and respond to them.

This might require some additional intelligence in this plugin and/or the Learning plugin in order to better recognize which one of them should be triggered. It's also possible that both plugins might need to be merged.

add archiving as a feature

stenlai's infoobot entry is getting out of hand. I suggest adding a command that allows for archiving to Chronicle.

'Learning' plugin should trigger if bot is PMed

If a user sends a private message to the bot, it should default to returning 'Learning' data to the user, unless the bot's prefix is detected.

For example, desired behavior would be (In a PM window with the bot):

<user> foo
<bot> foo is bar.
<user> !ldap bob
<bot> Performing LDAP search on bob...
...

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.