<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>LICENSE.markdown</filename>
    </added>
    <added>
      <filename>README.markdown</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,2 @@
-- thanks to yakischloba and careo on #eventmachine (freenode)
+- thanks to yakischloba and careo on #eventmachine
 - thanks to masuidrive (http://blog.masuidrive.jp/) for a helpful gist which i can't find anymore. it showed me how to write an irc client using eventmachine.
\ No newline at end of file</diff>
      <filename>CREDITS.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -3,9 +3,8 @@
 #
 module Mini
   class IRC &lt; EventMachine::Connection
-    
     include EventMachine::Protocols::LineText2
-    cattr_accessor *(@@config = [:user, :password, :server, :port, :channels])
+    cattr_accessor *((@@config = [:user, :password, :server, :port, :channels]) + [:moderators])
     
     def say(msg, targets = [])
       targets = ['#' + IRC.channels.first] if targets.blank?
@@ -19,19 +18,25 @@ module Mini
     end
         
     def execute(sender, receiver, msg)
-      (@queue ||= []) &lt;&lt; [sender, receiver, msg]
+      (@queue ||= []) &lt;&lt; [sender.split(&quot;!&quot;).first, msg]
       command &quot;NAMES&quot;, &quot;#&quot; + IRC.channels.first
     end
 
+    def unwind(nicks)
+      IRC.moderators = nicks.split.map { |nick| nick.delete(&quot;@&quot;).delete(&quot;+&quot;) }
+      
+      while job = (@queue ||= []).pop
+        sender, bang = job
+        say(%x{ #{ ruby -S miniminimini.rb bang[1..-1] } }) if IRC.moderators.include?(sender)
+      end
+    end
+    
     def self.connect(options)
       @@config.each { |param| IRC.send(&quot;#{ param }=&quot;, options[param]) }
-      EM.connect(IRC.server, IRC.port, self, options)
+      EM.connect(IRC.server, IRC.port.to_i, self, options)
     end
     
-    #
-    #  Callbacks
-    #
-    
+    # callbacks
     def post_init
       command &quot;USER&quot;, [IRC.user]*4
       command &quot;NICK&quot;, IRC.user
@@ -42,8 +47,8 @@ module Mini
     def receive_line(line)
       case line
       when /^PING (.*)/ : command('PONG', $1)
-      when /^:(\S+) PRIVMSG (.*) :\!(.*)$/ : execute($1, $2, $3)
-      when /^:NAMES / : unwind(nicks)
+      when /^:(\S+) PRIVMSG (.*) :\?(.*)$/ : execute($1, $2, $3)
+      when /^:\S* \d* #{ IRC.user } @ #{ '#' + IRC.channels.first } :(.*)/ : unwind($1)
       else puts line; end
     end
     
@@ -54,7 +59,4 @@ module Mini
       end
     end
   end
-end
-
-__END__
-:hubbard.freenode.net 353 dslkfjlds @ #eventmachine :+dslkfjlds +joseferr +yakischloba +rsimon +alloy +Aria +mchung +dj2 +takiuchi_ +elven +elliottcable @raggi +tmm1 +igrigorik +manveru +SuttoL @ChanServ +wyhaines +garbagecat 
\ No newline at end of file
+end
\ No newline at end of file</diff>
      <filename>lib/mini/irc.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>LICENSE.textile</filename>
    </removed>
    <removed>
      <filename>README.textile</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>7e540561f1e94202c75d569b88e90a87a9a0b5a6</id>
    </parent>
  </parents>
  <author>
    <name>Rany Keddo</name>
    <email>rany@playtype.net</email>
  </author>
  <url>http://github.com/purzelrakete/mini/commit/267f11562e60cfe264d570a23a2c75cebde9c2be</url>
  <id>267f11562e60cfe264d570a23a2c75cebde9c2be</id>
  <committed-date>2009-02-19T14:10:03-08:00</committed-date>
  <authored-date>2009-02-19T14:10:03-08:00</authored-date>
  <message>finsihed</message>
  <tree>e83a3feedae97e0e7db856eb6d66fdcae769b85d</tree>
  <committer>
    <name>Rany Keddo</name>
    <email>rany@playtype.net</email>
  </committer>
</commit>
