Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (13 sloc) 336 Bytes
require 'json'
loop do
ask "Press a key or push zero to exit.", {
:choices => "[1 DIGITS]",
:onChoice => lambda { |event|
input = { :command => event.value }.to_json
message input, {
:to => "troporiffic@jabber.org",
:network => "JABBER"}
exit if event.value == "0"
}
}
end