4 # :title: RemoteCtl plugin
6 # Author:: jsn (dmitry kim) <dmitry dot kim at gmail dot org>
7 # Copyright:: (C) 2007 dmitry kim
8 # License:: in public domain
10 # Adds druby remote command execution to rbot. See 'bin/rbot-remote' for
13 class RemoteCtlPlugin < Plugin
16 def remote_command(m, params)
17 s = params[:string].to_s
18 new_m = PrivMessage.new(@bot, @bot.server, m.source, @bot.nick, s)
19 @bot.plugins.delegate "listen", new_m
20 @bot.plugins.privmsg(new_m)
24 me = RemoteCtlPlugin.new
26 me.remote_map 'dispatch *string',
27 :action => 'remote_command',
28 :action_path => 'dispatch'
30 me.default_auth('*', false)