Permalink
Browse files

Updated README and examples

  • Loading branch information...
1 parent 2c7cb28 commit 5294749072c407759dcdb24f63b930b457467368 Avdi Grimm committed Jul 11, 2010
Showing with 10 additions and 3 deletions.
  1. +2 −3 README.org
  2. +8 −0 example/bot.rb
View
@@ -9,6 +9,8 @@
* Firetower
+ [[file:images/BaldMountainLookout.jpg]]
+
A command-line interface to the Campfire API
(http://developer.37signals.com/campfire/) by [[mailto:avdi@avdi.org][Avdi Grimm]]
@@ -65,9 +67,6 @@
***** Stop server
: firetower stop
-*** Advanced
-***** A simple bot
-
*** License
(The MIT License)
View
@@ -0,0 +1,8 @@
+# Drop this in ~/.firetower/firetower.conf for a simple (and VERY UNSAFE!) demo
+# of a Campfire bot:
+
+receive do |session, event|
+ if event['type'] == 'TextMessage' && event['body'] =~ /^!eval (.*)$/
+ event.room.account.paste!(event.room.name, "Eval result:\n" + eval($1).to_s)
+ end
+end

0 comments on commit 5294749

Please sign in to comment.