Permalink
Browse files

Merge pull request #1 from samwho/master

Fix require error. Add test code.
  • Loading branch information...
Jordan Goldstein
Jordan Goldstein committed Jun 12, 2012
2 parents af24ede + 365eeb5 commit 7c1b0e3ef558ef4643f1d2bbe7160f28c8629cb9
Showing with 33 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +1 −0 .rvmrc
  3. +2 −1 Gemfile
  4. +10 −0 Gemfile.lock
  5. +15 −0 bin/testing
  6. +4 −1 lib/dudley.rb
View
@@ -1 +1,2 @@
*.swp
.session.vim
View
1 .rvmrc
@@ -0,0 +1 @@
rvm 1.9.3@dudley --create
View
@@ -1,2 +1,3 @@
source :rubygems
gem "Ruby-IRC", "~> 1.0.13"
gem "Ruby-IRC"
View
@@ -0,0 +1,10 @@
GEM
remote: http://rubygems.org/
specs:
Ruby-IRC (1.0.13)
PLATFORMS
ruby
DEPENDENCIES
Ruby-IRC
View
@@ -0,0 +1,15 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../lib/dudley'
bot = IRC.new("dudley", "192.168.1.131", "6667", "Mr Bot")
IRCEvent.add_callback('endofmotd') do |event|
bot.add_channel('#dnd')
end
IRCEvent.add_callback('join') do |event|
bot.send_message(event.channel, "Hello #{event.from}")
end
bot.connect
View
@@ -1 +1,4 @@
require "Ruby-IRC"
libdir = File.dirname(__FILE__)
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
require 'IRC'

0 comments on commit 7c1b0e3

Please sign in to comment.