Sha256: 0027b31a9f3cce156a6a55975e52da52d37f1b926f24d1fd1d05416ad9bdac7d

Contents?: true

Size: 279 Bytes

Versions: 2

Compression:

Stored size: 279 Bytes

Contents

%w[rubygems lib/blather].each { |r| require r }

setup 'echo@jabber.local', 'echo'

# Auto approve subscription requests
handle :subscription do |s|
  write(s.approve!) if s.request?
end

# Echo back what was said
handle :message do |m|
  write(m.reply) if m.chat? && m.body
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blather-0.2.1 examples/echo.rb
blather-0.2 examples/echo.rb