Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
IRC bot for #techatnyu on freenode
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
configs
lib added ConfigData class to read configuration files
plugins
Gemfile basic bot using cinch. added AutoImage plugin.
Gemfile.lock basic bot using cinch. added AutoImage plugin.
Procfile
README.md added info on config files
bot.rb fixed op responder

README.md

TNYU_IRCbot

IRC bot for #tech@nyu on freenode

Adding Features (Plugins)

This bot uses cinch, which makes it mad-super-easy to add features. Just write a plugin and put it in the plugins/ directory. Check out some plugin examples and take a look at the plugin documentation for more information.

IMPORTANT: Don't forget to add your plugin's dependencies to the Gemfile!

Configuration Files

Configuration files are located in configs/. If you want to use a configuration file with your plugin, please place it there and give it the same name as your plugin so we know what's what.

ConfigData is a configuration data parser that you can use to easily read files located in configs/. It will create an array where each element is a line from your config file, and attempt to create a hash of any key/value pairs in the form [key]: [value]. It ignores empty lines and comments preceeded with #. See lib/ConfigData.rb for more information.

For example, if you create /configs/MyConfig and its contents are:

# this is my config file

juju: "Magic Ju-ju"
awesome_level: 7

I am a lonely string at the end of a file...

then you can access your data as follows:

mydata = ConfigData.new :MyConfig
mydata.hash[:juju]
  #=> "Magic Ju-ju"
mydata.array[2]
  #=> "I am a lonely string at the end of a file..."
Something went wrong with that request. Please try again.