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
cleanup()
click to toggle source
Redefine the default cleanup method.
Calls superclass method
# File lib/rbot/core/remote.rb, line 288 def cleanup super remote_cleanup end
remote_cleanup()
click to toggle source
Unregister the remote maps.
# 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
remote_map(*args)
click to toggle source
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 def remote_map(*args) @remote_maps = Array.new unless defined? @remote_maps @remote_maps << @bot.remote_dispatcher.map(self, *args) end