Method: Cinch::Bot#initialize
- Defined in:
- lib/cinch/bot.rb
#initialize { ... } ⇒ Bot
Returns a new instance of Bot.
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/cinch/bot.rb', line 334 def initialize(&b) @loggers = LoggerList.new @loggers << Logger::FormattedLogger.new($stderr) @config = Configuration::Bot.new @handlers = HandlerList.new @semaphores_mutex = Mutex.new @semaphores = Hash.new { |h, k| h[k] = Mutex.new } @callback = Callback.new(self) @channels = [] @quitting = false @modes = [] @user_list = UserList.new(self) @channel_list = ChannelList.new(self) @plugins = PluginList.new(self) @join_handler = nil @join_timer = nil super(nil, self) instance_eval(&b) if block_given? end |