Class | ::Bot::RemoteObject |
In: |
lib/rbot/core/remote.rb
|
Parent: | Object |
The Irc::Bot::RemoteObject class represents and object that will take care of interfacing with remote clients
Example client session:
require 'drb' rbot = DRbObject.new_with_uri('druby://localhost:7268') id = rbot.delegate(nil, 'remote login someuser somepass')[:return] rbot.delegate(id, 'some secret command')
Of course, the remote login is only neede for commands which may not be available to everyone
The delegate method. This is the main method used by remote clients to send commands to the bot. Most of the time, the method will be called with only two parameters (session id and a String), but we allow more parameters for future expansions.
The session_id can be nil, meaning that the remote client wants to work as an anoynomus botuser.