Permalink
Browse files

Add play mode to firetower command.

  • Loading branch information...
1 parent b22dcd4 commit 342df047ab9e58c9a81133f7627a02de72d06740 @technicalpickles technicalpickles committed Jul 7, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 bin/firetower
View
@@ -30,6 +30,7 @@ Main do
"#{program} say 'hello, Campfire'",
"#{program} say subdomain=mycompany room='Watercooler' 'hello room'",
"echo 'hello, Campfire' | #{program} say",
+ "#{program} play live",
"#{program} paste '2+2 => 4'",
"#{program} paste subdomain=mycompany room='Watercooler' 'foobar'",
"#{program} paste --from=sel",
@@ -98,6 +99,22 @@ Main do
end
end
+ mode :play do
+ description "Play a sound in a campfire chat room"
+ mixin :address
+ argument :sound do
+ required
+ attr
+ end
+
+ def run
+ with_session do |session|
+ room = selected_room(session)
+ room.account.play!(room.name, sound)
+ end
+ end
+ end
+
mode :say do
description "Say something in a campfire chat room"
mixin :address

0 comments on commit 342df04

Please sign in to comment.