lib/saber/server.rb in saber-0.0.3 vs lib/saber/server.rb in saber-0.0.4

- old
+ new

@@ -6,12 +6,13 @@ def self.start # register on_finished event. Retort::Service.call("system.method.set_key", "event.download.closed", "saber-download", "execute= /usr/bin/saber-drb_add, $d.get_hash=, $d.get_custom1=") s = Server.new - s.start DRbServer.start(s) + s.start + DRb.thread.join end attr_reader :client @@ -25,11 +26,11 @@ client.send Jabber::Presence.new Saber.ui.say ">> Connected to xmpp with #{Rc.server.xmpp.jid}" end def send(files) - Saber.ui.say %~::send::\n #{files.join("\n")}\n\n~ + $log.debug %~::send::\n #{files.join("\n")}\n\n~ client.send Jabber::Message.new(Rc.client.xmpp.jid, files.join("\n")) end end class DRbServer @@ -51,10 +52,10 @@ Saber.ui.say ">> DRbSever listening on #{Rc.drb_uri}" end # drb. add a complete torrent. def add(*names) - Saber.ui.debug "::DRbServer add:: #{names.inspect}" + $log.debug "::DRbServer add:: #{names.inspect}" files = build_files(*names) saber_server.send(files) end