<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,7 +11,7 @@ puts &quot;irccat 0.2 (http://irccat.rubyforge.org/)&quot;
 
 Thread.new {
 @bot = IrcCat::Bot.new(:host =&gt; @config['irc']['host'], :port =&gt; @config['irc']['port'], 
-	:nick =&gt; @config['irc']['nick'], :channel =&gt; @config['irc']['channel'])
+  :nick =&gt; @config['irc']['nick'], :channel =&gt; @config['irc']['channel'])
 }
 
 Thread.new {</diff>
      <filename>lib/irc_cat.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,121 +6,121 @@ module IrcCat
 # The IRC bot
 class Bot
 
-	attr_accessor :socket, :host, :port, :nick, :channel
-  
-	# Initialize the bot with default values
-	def initialize(constructor = H.new)
-		@realname = 'irccat - http://irccat.rubyforge.org/'
-		@refresh_rate = 10
-		
-		constructor.each do |key, val|
-			if val.is_a?(String)
-				instance_eval(&quot;@#{key} = '#{val}'&quot;)
-			elsif val.is_a?(Array) 
-				instance_eval(&quot;@#{key} = []&quot;)
-				val.each do |v| instance_eval(&quot;@#{key}.push('#{v}')&quot;) end
-			end
-		end
-		puts &quot;Connecting to IRC #{@host}:#{@port} #{@channel}&quot; 
-	end
-  
-	def run
-		@socket = TCPSocket.open(@host, @port)    
-		login
-		
+  attr_accessor :socket, :host, :port, :nick, :channel
+  
+  # Initialize the bot with default values
+  def initialize(constructor = H.new)
+    @realname = 'irccat - http://irccat.rubyforge.org/'
+    @refresh_rate = 10
+    
+    constructor.each do |key, val|
+      if val.is_a?(String)
+        instance_eval(&quot;@#{key} = '#{val}'&quot;)
+      elsif val.is_a?(Array) 
+        instance_eval(&quot;@#{key} = []&quot;)
+        val.each do |v| instance_eval(&quot;@#{key}.push('#{v}')&quot;) end
+      end
+    end
+    puts &quot;Connecting to IRC #{@host}:#{@port} #{@channel}&quot; 
+  end
+  
+  def run
+    @socket = TCPSocket.open(@host, @port)    
+    login
+    
+    
+    threads=[]
+    
+    threads &lt;&lt; Thread.new {
+      begin
+        while line = @socket.gets do
+          # Remove all formatting
+          line.gsub!(/[\x02\x1f\x16\x0f]/,'')
+          # Remove CTCP ASCII
+          line.gsub!(/\001/,'')
+          # Send to event handler
+          handle line
+          # Handle Pings from Server
+          sendln &quot;PONG #{$1}&quot; if /^PING\s(.*)/ =~ line                  
+        end        
+      rescue EOFError
+        err 'Server Reset Connection'     
+      rescue Exception =&gt; e
+        err e
+      end
+    }
+    threads &lt;&lt; Thread.new {
+    }
+    threads.each { |th| th.join }
     
-		threads=[]
-		
-		threads &lt;&lt; Thread.new {
-			begin
-				while line = @socket.gets do
-					# Remove all formatting
-					line.gsub!(/[\x02\x1f\x16\x0f]/,'')
-					# Remove CTCP ASCII
-					line.gsub!(/\001/,'')
-					# Send to event handler
-					handle line
-					# Handle Pings from Server
-					sendln &quot;PONG #{$1}&quot; if /^PING\s(.*)/ =~ line                  
-				end        
-			rescue EOFError
-				err 'Server Reset Connection'     
-			rescue Exception =&gt; e
-				err e
-			end
-		}
-		threads &lt;&lt; Thread.new {
-		}
-		threads.each { |th| th.join }
-		
-		
-	end
-	
-	# Announces states
-	def announce(msg)
-		@channels.each do |channel|
-			say(channel, msg)
-		end
-	end
-	
-	# Say something funkeh
-	def say(chan,msg)
-		sendln &quot;PRIVMSG #{chan} :#{msg}&quot;
-	end
-	
-	private
-	
-	# Sends a message to the server
-	
-	def sendln(cmd)
-		if cmd.size &lt;= 510      
-			@socket.write(&quot;#{cmd}\r\n&quot;)
-			STDOUT.flush
-		else
-		end
-	end
-	
-	# Handle a received message
-	
-	def handle(line)
-		if line =~ /^:.+\s376/
-			join_channels
-		elsif line =~ /^:.+KICK #([^\s]+)/
-			auto_rejoin($1)
-		end
-	end
-	
-	# Automatic events
-	
-	def join_channels
-		sendln &quot;JOIN #{@channel}&quot;
-	end
-	
-	
-	def auto_rejoin(channel)
-		sendln &quot;JOIN ##{channel}&quot;
-	end
-	
-	def login
-		begin
-			#user = @mail.split(&quot;@&quot;)
-			sendln &quot;NICK #{@nick}&quot;     
-			sendln &quot;USER irc_cat . . :#{@realname}&quot;
-		rescue Exception =&gt; e
-			err e
-		end
-	end
-	
-	# Loggin methods
-	
-	def log(str)
-		$stdout.puts &quot;DEBUG: #{str}&quot;
-	end
-  
-	def err(exception)
-		$stderr.puts &quot;ERROR: #{exception}&quot;
-		$stderr.puts &quot;TRACE: #{exception.backtrace}&quot;
-	end
-	
+    
+  end
+  
+  # Announces states
+  def announce(msg)
+    @channels.each do |channel|
+      say(channel, msg)
+    end
+  end
+  
+  # Say something funkeh
+  def say(chan,msg)
+    sendln &quot;PRIVMSG #{chan} :#{msg}&quot;
+  end
+  
+  private
+  
+  # Sends a message to the server
+  
+  def sendln(cmd)
+    if cmd.size &lt;= 510      
+      @socket.write(&quot;#{cmd}\r\n&quot;)
+      STDOUT.flush
+    else
+    end
+  end
+  
+  # Handle a received message
+  
+  def handle(line)
+    if line =~ /^:.+\s376/
+      join_channels
+    elsif line =~ /^:.+KICK #([^\s]+)/
+      auto_rejoin($1)
+    end
+  end
+  
+  # Automatic events
+  
+  def join_channels
+    sendln &quot;JOIN #{@channel}&quot;
+  end
+  
+  
+  def auto_rejoin(channel)
+    sendln &quot;JOIN ##{channel}&quot;
+  end
+  
+  def login
+    begin
+      #user = @mail.split(&quot;@&quot;)
+      sendln &quot;NICK #{@nick}&quot;     
+      sendln &quot;USER irc_cat . . :#{@realname}&quot;
+    rescue Exception =&gt; e
+      err e
+    end
+  end
+  
+  # Loggin methods
+  
+  def log(str)
+    $stdout.puts &quot;DEBUG: #{str}&quot;
+  end
+  
+  def err(exception)
+    $stderr.puts &quot;ERROR: #{exception}&quot;
+    $stderr.puts &quot;TRACE: #{exception.backtrace}&quot;
+  end
+  
 end
 end
\ No newline at end of file</diff>
      <filename>lib/irc_cat/bot.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,25 +5,25 @@ require 'json'
 require 'json/add/rails'
 
 class Index &lt; Mongrel::HttpHandler
-	def process(request, response)
-		response.start(200) do |head,out|
-			head[&quot;Content-Type&quot;] = &quot;text/html&quot;
-			out.write(&quot;&lt;strong&gt;Welcome to irc_cat&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This irc_cat is ready to use:) Just send a GET to : &lt;code&gt;/send/your message&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;byekthx&quot;)
-		end
-	end
+  def process(request, response)
+    response.start(200) do |head,out|
+      head[&quot;Content-Type&quot;] = &quot;text/html&quot;
+      out.write(&quot;&lt;strong&gt;Welcome to irc_cat&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This irc_cat is ready to use:) Just send a GET to : &lt;code&gt;/send/your message&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;byekthx&quot;)
+    end
+  end
 end
 
 class Send &lt; Mongrel::HttpHandler
 
-	def initialize(bot, config); @bot = bot; @config = config; end
+  def initialize(bot, config); @bot = bot; @config = config; end
 
-	def process(request, response)
-		response.start(200) do |head,out|
-			head[&quot;Content-Type&quot;] = &quot;text/plain&quot;
-			message = CGI::unescape(&quot;#{request.params['PATH_INFO'].gsub('/','')}&quot;)
-			@bot.say(@config['irc']['channel'],&quot;#{message}&quot;)
-		end
-	end
+  def process(request, response)
+    response.start(200) do |head,out|
+      head[&quot;Content-Type&quot;] = &quot;text/plain&quot;
+      message = CGI::unescape(&quot;#{request.params['PATH_INFO'].gsub('/','')}&quot;)
+      @bot.say(@config['irc']['channel'],&quot;#{message}&quot;)
+    end
+  end
 end
 
 class Github &lt; Mongrel::HttpHandler
@@ -33,8 +33,8 @@ class Github &lt; Mongrel::HttpHandler
   def process(request, response)
     response.start(200) do |head,out|
       head[&quot;Content-Type&quot;] = &quot;text/plain&quot;
-      js = CGI.parse(request.body.read)
-      json = JSON.parse(js['payload'].join(','))
+      post = CGI.parse(request.body.read)
+      json = JSON.parse(post['payload'].join(','))
       json['commits'].each do |c|
         @bot.say(@config['irc']['channel'],&quot;[#{json['repository']['name']}] New commit by #{c.last['author']['name']} : #{c.last['message'].gsub(/\n(.*)/, '...')} - #{c.last['url']}&quot;)
       end
@@ -43,16 +43,16 @@ class Github &lt; Mongrel::HttpHandler
 end
 
 module IrcCat
-	class HttpServer
-		def initialize(bot, config, ip, port)
-			@bot = bot
-			@config = config
-			puts &quot;Starting HTTP (#{ip}:#{port})&quot;
-			h = Mongrel::HttpServer.new(ip, port)
-			h.register(&quot;/&quot;, Index.new)
-			h.register(&quot;/send&quot;, Send.new(@bot, @config))
-			h.register(&quot;/github&quot;, Github.new(@bot, @config)) if @config['http']['github'] == true
-			h.run.join
-		end
-	end # HttpServer
+  class HttpServer
+    def initialize(bot, config, ip, port)
+      @bot = bot
+      @config = config
+      puts &quot;Starting HTTP (#{ip}:#{port})&quot;
+      h = Mongrel::HttpServer.new(ip, port)
+      h.register(&quot;/&quot;, Index.new)
+      h.register(&quot;/send&quot;, Send.new(@bot, @config))
+      h.register(&quot;/github&quot;, Github.new(@bot, @config)) if @config['http']['github'] == true
+      h.run.join
+    end
+  end # HttpServer
 end # IrcCat
\ No newline at end of file</diff>
      <filename>lib/irc_cat/http_server.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,23 +1,23 @@
 # The TCP Server
 module IrcCat
-	class TcpServer
-		
-		def initialize(bot,config,ip='127.0.0.1',port='8080')
-			@socket = TCPserver.new(ip,port)
-			puts &quot;Starting TCP (#{ip}:#{port})&quot;
-			
-			loop do  
-				Thread.start(@socket.accept) do |s|
-					str = s.recv( 400 ) 
-					sstr = str.split(/\n/)
-					sstr.each do |l|
-						bot.say(config['irc']['channel'],&quot;#{l}&quot;)
-					end
-					s.close
-			  end  # |s|
-			end # loop
-			
-		end # initialize
-		
-	end # TcpServer
+  class TcpServer
+    
+    def initialize(bot,config,ip='127.0.0.1',port='8080')
+      @socket = TCPserver.new(ip,port)
+      puts &quot;Starting TCP (#{ip}:#{port})&quot;
+      
+      loop do  
+        Thread.start(@socket.accept) do |s|
+          str = s.recv( 400 ) 
+          sstr = str.split(/\n/)
+          sstr.each do |l|
+            bot.say(config['irc']['channel'],&quot;#{l}&quot;)
+          end
+          s.close
+        end  # |s|
+      end # loop
+      
+    end # initialize
+    
+  end # TcpServer
 end # IrcCat
\ No newline at end of file</diff>
      <filename>lib/irc_cat/tcp_server.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7e7ab974c7e6fb1eabbc8b60f915884e568ee6da</id>
    </parent>
  </parents>
  <author>
    <name>Jordan Bracco</name>
    <email>jordan@bracco.name</email>
  </author>
  <url>http://github.com/webs/irccat/commit/9ece269782343746239ab2ea539702f1360a316e</url>
  <id>9ece269782343746239ab2ea539702f1360a316e</id>
  <committed-date>2008-02-16T18:54:36-08:00</committed-date>
  <authored-date>2008-02-16T18:54:36-08:00</authored-date>
  <message>removed \t :p</message>
  <tree>780696e3cf8cd32b02ee8c6f4ebf573bc24ec7bd</tree>
  <committer>
    <name>Jordan Bracco</name>
    <email>jordan@bracco.name</email>
  </committer>
</commit>
