Class: HistoryPlugin
- Inherits:
-
Campfire::PollingBot::Plugin
- Object
- Campfire::PollingBot::Plugin
- HistoryPlugin
- Defined in:
- lib/campfire/polling_bot/plugins/history/history_plugin.rb
Overview
records every message the bot receives
Constant Summary
Constants inherited from Campfire::PollingBot::Plugin
Campfire::PollingBot::Plugin::HALT
Instance Attribute Summary
Attributes inherited from Campfire::PollingBot::Plugin
Instance Method Summary collapse
Methods inherited from Campfire::PollingBot::Plugin
accepts, #accepts?, accepts?, bot, bot=, directory, directory=, inherited, #initialize, load_all, load_plugin_classes, #logger, logger, priority, #priority, requires_config, requires_config?, #requires_config?, setup_database, subclasses, #to_s
Constructor Details
This class inherits a constructor from Campfire::PollingBot::Plugin
Instance Method Details
#process(message) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/campfire/polling_bot/plugins/history/history_plugin.rb', line 6 def process() @room_locked ||= false if .kind_of?(Campfire::LockMessage) @room_locked = true return elsif .kind_of?(Campfire::UnlockMessage) @room_locked = false return end () unless @room_locked end |