<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/on_irc.rb</filename>
    </added>
    <added>
      <filename>lib/on_irc/config.rb</filename>
    </added>
    <added>
      <filename>lib/on_irc/config_accessor.rb</filename>
    </added>
    <added>
      <filename>lib/on_irc/connection.rb</filename>
    </added>
    <added>
      <filename>lib/on_irc/dsl_accessor.rb</filename>
    </added>
    <added>
      <filename>lib/on_irc/event.rb</filename>
    </added>
    <added>
      <filename>lib/on_irc/parser.rb</filename>
    </added>
    <added>
      <filename>lib/on_irc/server.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,19 +1,27 @@
+BSD License
+
 Copyright (c) 2008 Scott Olson
- 
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the &quot;Software&quot;), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
- 
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
- 
-THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 </diff>
      <filename>LICENSE</filename>
    </modified>
    <modified>
      <diff>@@ -1,37 +1,49 @@
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
-require 'irc'
+#!/usr/bin/env ruby
+require File.join(File.dirname(__FILE__), 'lib', 'on_irc')
 
-irc = IRC.new do
+IRC.configure do
   nick 'on_irc'
   ident 'on_irc'
   realname 'on_irc Ruby IRC library'
   
-  server 'freenode' do
+  server :eighthbit do
+    address 'irc.eighthbit.net'
+  end
+  
+  server :freenode do
     address 'irc.freenode.org'
   end
 end
 
 
-# irc.on_001 do
-#   irc.join '#on_irc'
-# end
-# 
-# irc.on_privmsg do |e|
-#   case e.message
-#   when '!ping'
-#     irc.msg(e.recipient, e.sender.nick + ': pong')
-#   when /^!echo (.*)/
-#     irc.msg(e.recipient, e.sender.nick + ': ' + $1)
-#   when /^!join (.*)/
-#     irc.join($1)
-#   end
-# end
-# 
-# irc.on_all_events do |e|
-#   p e
-# end
-# 
-# irc.connect
-
-require 'pp'
-pp irc
\ No newline at end of file
+IRC[:freenode].on :'001' do |e|
+  IRC.send(e.server, :join, '#botters')
+end
+
+IRC[:eighthbit].on :'001' do |e|
+  IRC.send(e.server, :join, '#offtopic')
+end
+
+IRC.on :privmsg do |e|
+  case e.params[1]
+  when '!ping'
+    IRC.send(e.server, :privmsg, e.params[0], e.prefix.split('!').first + ': pong')
+  when /^!echo (.*)/
+    s = $1
+    IRC.send(e.server, :privmsg, e.params[0], e.prefix.split('!').first + ': ' + s)
+  when /^!join (.*)/
+    IRC.send(e.server, :join, $1)
+  end
+end
+
+IRC.on :ping do |e|
+  IRC.send(e.server, :pong, e.params[0])
+end
+
+IRC.on :all do |e|
+  prefix = &quot;(#{e.prefix}) &quot; unless e.prefix.empty?
+  puts &quot;#{e.server}: #{prefix}#{e.command} #{e.params.inspect}&quot;
+end
+
+IRC.connect
+</diff>
      <filename>bot.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>README</filename>
    </removed>
    <removed>
      <filename>lib/irc.rb</filename>
    </removed>
    <removed>
      <filename>lib/irc/channel.rb</filename>
    </removed>
    <removed>
      <filename>lib/irc/commands.rb</filename>
    </removed>
    <removed>
      <filename>lib/irc/config.rb</filename>
    </removed>
    <removed>
      <filename>lib/irc/configdslhelper.rb</filename>
    </removed>
    <removed>
      <filename>lib/irc/event.rb</filename>
    </removed>
    <removed>
      <filename>lib/irc/events.rb</filename>
    </removed>
    <removed>
      <filename>lib/irc/mask.rb</filename>
    </removed>
    <removed>
      <filename>lib/irc/server.rb</filename>
    </removed>
    <removed>
      <filename>lib/irc/user.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>92f910cdb4e7114f66fa9dfed1f41840f13d451d</id>
    </parent>
  </parents>
  <author>
    <name>Scott Olson</name>
    <email>scott@scott-olson.org</email>
  </author>
  <url>http://github.com/tsion/on_irc/commit/97d07c9448e6c310d1005171505ce1a56ec4bab1</url>
  <id>97d07c9448e6c310d1005171505ce1a56ec4bab1</id>
  <committed-date>2009-07-06T20:30:41-07:00</committed-date>
  <authored-date>2009-07-06T20:30:41-07:00</authored-date>
  <message>The all new on_irc 2.0. Everything has changed; config, networking,
handlers. It is now multi-network capable. Sorry for putting this all in
one commit; on_irc was very disorganized.</message>
  <tree>5f5027b845cb2584e73789514c759a12ab18edc1</tree>
  <committer>
    <name>Scott Olson</name>
    <email>scott@scott-olson.org</email>
  </committer>
</commit>
