Class: Artaius::Bot

Inherits:
Cinch::Bot
  • Object
show all
Defined in:
lib/artaius/bot.rb

Constant Summary collapse

FIRST_NAME =

Internal: Name.

'Artaius'
SECOND_NAME =

Internal: Surname.

'Lucius'
SERVER =

Internal: IRC server to join.

'irc.quakenet.org'
PORT =

Internal: Port of IRC server.

6667
CHANNELS =

Internal: Channels, that bot should be present on..

['#kag2d.ru']

Instance Method Summary collapse

Constructor Details

#initializeBot

Returns a new instance of Bot.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/artaius/bot.rb', line 23

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