<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,5 @@
 log/*.log
 tmp/pids/*.pid
 config/settings.yml
-tmp/datastore.json
\ No newline at end of file
+config/connections.yml
+</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -3,8 +3,9 @@ require 'rubygems'
 require File.join(File.dirname(__FILE__), &quot;..&quot;, &quot;lib&quot;, &quot;marvin&quot;)
 
 Marvin::Application.processing(ARGV) do |a|
-  
-  a.banner = &quot;Marvin v#{Marvin::VERSION} - An IRC Library for Ruby&quot;
+  version = Marvin.version
+  version &lt;&lt; &quot;p#{Marvin::VERSION[3]}&quot; if Marvin::VERSION[3] != 0
+  a.banner = &quot;Marvin v#{version} - An IRC Library for Ruby&quot;
   
   a.generator!
   </diff>
      <filename>bin/marvin</filename>
    </modified>
    <modified>
      <diff>@@ -26,13 +26,22 @@ module Marvin
           @host_with_port
         end
         
-        def method_missing(name, *args)
+        def method_missing(name, *args, &amp;blk)
           logger.debug &quot;Proxying #{name}(#{args.inspect[1..-2]}) to #{@host_with_port}&quot;
+          cb = nil
+          if blk.present?
+            cb = proc do |_, options|
+              if options.is_a?(Hash) 
+                value = options.delete(&quot;return-value&quot;)
+                blk.call(value)
+              end
+            end
+          end
           @connection.send_message(:action, {
             &quot;action&quot;      =&gt; name.to_s,
             &quot;arguments&quot;   =&gt; args,
             &quot;client-host&quot; =&gt; @host_with_port
-          })
+          }, &amp;cb)
         end
         
       end</diff>
      <filename>lib/marvin/distributed/client.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,6 @@ module Marvin
   module Distributed
     class Handler &lt; Marvin::Base
       
-      
       EVENT_WHITELIST = [:incoming_message, :incoming_action]
       QUEUE_PROCESSING_SPACING = 3
       </diff>
      <filename>lib/marvin/distributed/handler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -63,6 +63,11 @@ module Marvin
         enable_ssl
       end
       
+      def handle_noop(opts = {})
+        # DO NOTHING.
+        logger.debug &quot;no-op&quot;
+      end
+      
       # After the connection is made and / or ssl is enabled.
       def post_connect
       end
@@ -130,6 +135,7 @@ module Marvin
       # Default Handlers
       register_handler_method :enable_ssl
       register_handler_method :enabled_ssl
+      register_handler_method :noop
       
       def connected?
         instance_variable_defined?(:@connected) &amp;&amp; @connected</diff>
      <filename>lib/marvin/distributed/protocol.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,7 +35,7 @@ module Marvin
       end
       
       def post_connect
-        logger.info &quot;Connection started, welcoming&quot;
+        logger.debug &quot;Remote client available, welcoming&quot;
         send_message(:welcome)
         complete_processing
       end
@@ -86,14 +86,17 @@ module Marvin
       def handle_action(options = {})
         return if fails_auth!
         logger.debug &quot;Handling action from on #{self.host_with_port}&quot;
-        server    = lookup_client_for(options[&quot;client-host&quot;])
+        target    = lookup_client_for(options[&quot;client-host&quot;])
         action    = options[&quot;action&quot;]
         arguments = [*options[&quot;arguments&quot;]]
-        return if server.blank? || action.blank?
+        return if target.blank? || action.blank?
         begin
           a = action.to_sym
-          if self.action_whitelist.include?(a)
-            server.send(a, *arguments) if server.respond_to?(a)
+          if self.action_whitelist.include?(a) &amp;&amp; target.respond_to?(a)
+            res = target.send(a, *arguments)
+            if @callback_id.present? &amp;&amp; res.respond_to?(:to_json)
+              send_message_reply(:noop, {&quot;return-value&quot; =&gt; res.to_json})
+            end
           else
             logger.warn &quot;Client attempted invalid action #{a.inspect}&quot;
           end</diff>
      <filename>lib/marvin/distributed/server.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>config/connections.yml</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>c055b4e823071d8a1570379b8fc9dcb63f494c61</id>
    </parent>
  </parents>
  <author>
    <name>Darcy Laycock</name>
    <email>sutto@sutto.net</email>
  </author>
  <url>http://github.com/Sutto/marvin/commit/659e46b140368854555a887824551a6b1d104ee0</url>
  <id>659e46b140368854555a887824551a6b1d104ee0</id>
  <committed-date>2009-09-18T16:50:45-07:00</committed-date>
  <authored-date>2009-09-18T16:50:45-07:00</authored-date>
  <message>More work on improving the distributed stuff</message>
  <tree>abe4899341d777f6da8fdd2026ca31df676ccfa1</tree>
  <committer>
    <name>Darcy Laycock</name>
    <email>sutto@sutto.net</email>
  </committer>
</commit>
