module Irc::Bot::Plugins::RemoteBotModule
We create a new Ruby module that can be included by BotModules that want to provide remote interfaces
Public Instance Methods
Source
# File lib/rbot/core/remote.rb, line 288 def cleanup super remote_cleanup end
Redefine the default cleanup method.
Calls superclass method
Source
# File lib/rbot/core/remote.rb, line 278 def remote_cleanup return unless defined? @remote_maps @remote_maps.each { |h| @bot.remote_dispatcher.unmap(self, h) } @remote_maps.clear end
Unregister the remote maps.
Source
# File lib/rbot/core/remote.rb, line 271 def remote_map(*args) @remote_maps = Array.new unless defined? @remote_maps @remote_maps << @bot.remote_dispatcher.map(self, *args) 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