Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'tinder'
- campfire = Tinder::Campfire.new 'campfire_subdomain'
- campfire.login 'username', 'password'
- room = campfire.find_room_by_name 'room'
- room.listen do |m|
- if m[:message] == "whoisgettinglunch?" then
- winner = room.users[rand(room.users.length)].strip.gsub(/<\/?[^>]*>/, "")
- room.speak "#{winner} is getting lunch!"
- end
- end
Add Comment
Please, Sign In to add comment