| Module | ::Bot::Plugins::RemoteBotModule |
| In: |
lib/rbot/core/remote.rb
|
We create a new Ruby module that can be included by BotModules that want to provide remote interfaces
Unregister the remote maps.
# File lib/rbot/core/remote.rb, line 278
278: def remote_cleanup
279: return unless defined? @remote_maps
280: @remote_maps.each { |h|
281: @bot.remote_dispatcher.unmap(self, h)
282: }
283: @remote_maps.clear
284: end
The remote_map acts just like the BotModule#map method, except that the map is registered to the @bot‘s remote_dispatcher. Also, the remote map handle is handled for the cleanup management
# File lib/rbot/core/remote.rb, line 271
271: def remote_map(*args)
272: @remote_maps = Array.new unless defined? @remote_maps
273: @remote_maps << @bot.remote_dispatcher.map(self, *args)
274: end