Sha256: e9c31b2eaf6ba72aeef0e279c8b79ae75d5a56fc2de3d6602f8b65fd6806d9b2

Contents?: true

Size: 824 Bytes

Versions: 2

Compression:

Stored size: 824 Bytes

Contents

#!/usr/bin/env ruby

require 'botolo'
require 'openssl'
require 'codesake-commons'

DEFAULT_BEHAVIOUR = "./lib/botolo/bot/behaviour.rb"
BOTOLO_PID = File.join(".", "botolo.pid") 

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

$logger  = Codesake::Commons::Logging.instance
$logger.filename="./codesake-bot.log"
trap("INT")   { @bot.stop; $logger.bye }

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?

$logger.helo "botolo", Botolo::VERSION, BOTOLO_PID

@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?
  # Process.daemon(true, true)
@bot.infinite_loop


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
botolo-0.32.8 bin/botolo
botolo-0.32.7 bin/botolo