Sha256: 9e2683b89d86c82626e9c576254897fb6417a329d15f5056c8c0cca5b8e57134

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

module Artaius

  # Internal: Turn the bot into a polyglot.
  I18n = R18n.from_env('config/locales/', :ru)

  class Bot < Cinch::Bot

    # Internal: Name.
    FIRST_NAME  = 'Artaius'

    # Internal: Surname.
    SECOND_NAME = 'Lucius'

    # Internal: IRC server to join.
    SERVER      = 'irc.quakenet.org'

    # Internal: Port of IRC server.
    PORT        = 6667

    # Internal: Channels, that bot should be present on..
    CHANNELS    = ['#kag2d.ru']

    def initialize
      super

      # Bot configuration.
      configure do |c|
        c.nick     = FIRST_NAME
        c.realname = "#{FIRST_NAME} #{SECOND_NAME}"
        c.user     = "#{FIRST_NAME} #{SECOND_NAME}"
        c.server   = SERVER
        c.port     = PORT
        c.channels = CHANNELS
        c.plugins.plugins = [
          Artaius::Plugins::Identify,
          Artaius::Plugins::Mixer,
          Artaius::Plugins::Archivarius,
          Artaius::Plugins::Autovoicer,
          Artaius::Plugins::Autoopper,
          Artaius::Plugins::Scraper,
          Artaius::Plugins::NewsFetcher,
          Artaius::Plugins::Informator
        ]

        # Set up plugins to be used.
        c.plugins.options[Artaius::Plugins::Identify] = {
          :username => FIRST_NAME,
          :password => Psych.load_file('config/plugins/identify.yml')[:password]
        }
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
artaius-0.2.1 lib/artaius/bot.rb