#!/usr/bin/env ruby # # Created by macournoyer on 2007-10-10. # Copyright (c) 2007. All rights reserved. begin require 'rubygems' rescue LoadError # no rubygems to load, so we fail silently end require 'optparse' require File.dirname(__FILE__) + '/../lib/scout' # NOTE: the option -p/--path= is given as an example, and should probably be replaced in your application. OPTIONS = { :subdomain => nil, :email => nil, :password => nil, :room => nil, :name => 'bot' } MANDATORY_OPTIONS = %w( subdomain email password room ) parser = OptionParser.new do |opts| opts.banner = < OPTIONS[:name]) puts "Starting the bot, CTRL+C to stop ..." bot.listen!