<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,6 +6,9 @@ irc:
   nick_pass: foo
   channel: '#irc_cat'
   channel_pass: bar
+  # or:
+  # channel: ['#one', '#two', '#three']
+  # NB: the multichannel quickhack requires channel_pass to be hacked up. (not done (yet?))
 
 # HTTP Server
 
@@ -24,4 +27,4 @@ tcp:
   enabled: true
   host: 0.0.0.0
   port: '5678'
-  size: 400
\ No newline at end of file
+  size: 400</diff>
      <filename>config.yml</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ module IrcCat
 # The IRC bot
 class Bot
 
-  attr_accessor :socket, :host, :port, :nick, :channel, :nick_pass, :channel_pass
+  attr_accessor :socket, :host, :port, :nick, :channel, :nick_pass, :channel_pass, :channels
   
   # Initialize the bot with default values
   def initialize(constructor = H.new)
@@ -21,6 +21,12 @@ class Bot
         val.each do |v| instance_eval(&quot;@#{key}.push('#{v}')&quot;) end
       end
     end
+
+    if (@channel.is_a?(Array))
+      @channels = @channel
+      @channel  = @channels[0]
+    end
+
     puts &quot;Connecting to IRC #{@host}:#{@port} #{@channel}&quot; 
   end
   
@@ -106,7 +112,13 @@ class Bot
   # Automatic events
   
   def join_channels
-    sendln &quot;JOIN #{@channel} #{@channel_pass}&quot;
+    if (@channels == nil)
+      sendln &quot;JOIN #{@channel} #{@channel_pass}&quot;
+    else
+      @channels.each do |ch|
+        sendln &quot;JOIN #{ch}&quot;
+      end
+    end
   end
   
   
@@ -140,4 +152,4 @@ class Bot
   end
   
 end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/irc_cat/bot.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,8 +5,29 @@ class Send &lt; Mongrel::HttpHandler
   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;)
+  
+      # changed PATH_INFO to REQUEST_URI.
+      # : PATH_INFO cuts off /;.*/, REQUEST_URI doesnt. the gsub is needed anyway.
+      # if the /send path gets configurable, this needs to be fixed.
+      message = CGI::unescape(&quot;#{request.params['REQUEST_URI'].gsub('/send/','')}&quot;)
+
+      # quick hack:
+      # /send/c;channel/message
+      # /send/n;nick/message
+      mo = message.match(/^(c|n);(.*)\/(.*)/)
+      if (mo == nil)
+	if (@config['irc']['channel'].is_a?(Array))
+          @bot.say(@config['irc']['channel'][0],&quot;#{message}&quot;)
+	else
+          @bot.say(@config['irc']['channel'],&quot;#{message}&quot;)
+	end
+      elsif (mo[1] == &quot;c&quot;)
+        @bot.say(&quot;#&quot; + mo[2], mo[3])
+      elsif (mo[1] == &quot;n&quot;)
+        @bot.say(mo[2], mo[3])
+      end
+      # EoQh
+
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/irc_cat/http_server/send.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>839fb2877fb721f5893ff63c50a6f4bbf1252d08</id>
    </parent>
  </parents>
  <author>
    <name>Rico Gloeckner</name>
    <email>rg@localhost.(none)</email>
  </author>
  <url>http://github.com/webs/irccat/commit/c710e26c51a3db08022f9e88fb6fb2ab1f8052f8</url>
  <id>c710e26c51a3db08022f9e88fb6fb2ab1f8052f8</id>
  <committed-date>2008-12-17T07:23:14-08:00</committed-date>
  <authored-date>2008-12-16T23:16:26-08:00</authored-date>
  <message>Quick Hack to add multi-channel-ability to irccat.

! This is a WFM, for a generic solution, some things needs to fixed
! first.  thanks.

Signed-off-by: Jordan Bracco &lt;jordan@bracco.name&gt;</message>
  <tree>fc709268729974596c5caae3ea4a995ed7ceaac5</tree>
  <committer>
    <name>Jordan Bracco</name>
    <email>jordan@bracco.name</email>
  </committer>
</commit>
