Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 24 lines (18 sloc) 601 Bytes
#!/usr/bin/env ruby
# -*- ruby -*-
require 'rubygems'
require File.dirname(__FILE__) + '/lib/pelvis'
require 'pelvis/protocols/xmpp'
require File.dirname(__FILE__) + '/examples/actors/herault'
require File.dirname(__FILE__) + '/examples/actors/randomz'
if ENV["DEBUGGER"]
Pelvis.logger.level = Logger::DEBUG
Blather::LOG.level = Logger::DEBUG
end
EM.run do
c = Pelvis.connect(:xmpp, :jid => "herault@localhost/agent", :password => "testing", :advertise => false) do |agent|
agent.add_actor Herault
agent.on_advertised { puts "herault is ready" }
end
c.on_failed { EM.stop }
end