Sha256: e4e1b46339b33b2f15de93ac7031a34a4bc2b50b666e12acc197e825be603d35

Contents?: true

Size: 701 Bytes

Versions: 2

Compression:

Stored size: 701 Bytes

Contents

#!/usr/bin/env ruby

require 'botolo'
require 'openssl'
require 'codesake_commons'

DEFAULT_BEHAVIOUR = "./lib/botolo/bot/behaviour.rb"

OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

$logger  = Codesake::Commons::Logging.instance
trap("INT")   { @bot.stop; $logger.helo('bot is shutting down'); Kernel.exit(0) }

behaviour_file = DEFAULT_BEHAVIOUR
config_file = nil
config_file = ARGV[0] if ARGV.count == 1

$logger.die "usage: botolo bot_configuration_file" if config_file.nil?

@bot = Botolo::Bot::Engine.new({:config=>config_file})
$logger.log "#{@bot.name} is online" if @bot.online?
$logger.log "#{@bot.name} is offline" unless @bot.online?
@bot.run if @bot.online?
@bot.infinite_loop


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
botolo-0.21.0 bin/botolo
botolo-0.20.0 bin/botolo