Module: Atig::Client

Defined in:
lib/atig/client.rb

Class Method Summary collapse

Class Method Details

.runObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/atig/client.rb', line 6

def run
  opts = Atig::OptParser.parse!(ARGV)

  opts[:logger] = Logger.new(opts[:log], "weekly")
  opts[:logger].level = opts[:debug] ? Logger::DEBUG : Logger::INFO

  conf = File.expand_path opts[:conf]
  if File.exist? conf then
    opts[:logger].info "Loading #{conf}"
    load conf
  end

  Net::IRC::Server.new(opts[:host], opts[:port], Atig::Gateway::Session, opts).start
end