Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 20 lines (14 sloc) 0.351 kB
#!/usr/bin/env ruby
require 'rubygems'
require 'blather/client'
when_ready { puts "Connected ! send messages to #{jid.stripped}." }
subscription :request? do |s|
write_to_stream s.approve!
end
message :chat?, :body => 'exit' do |m|
say m.from, 'Exiting ...'
shutdown
end
message :chat?, :body do |m|
say m.from, "You sent: #{m.body}"
end
Jump to Line
Something went wrong with that request. Please try again.