def remote_command(m, params)
s = params[:string].to_s
- new_m = PrivMessage.new(@bot, @bot.server, m.source, @bot.nick, s)
- @bot.plugins.delegate "listen", new_m
- @bot.plugins.privmsg(new_m)
+ u = @bot.server.user("remote:#{m.source.username}")
+ @bot.auth.login(u, m.source.username, m.source.password)
+ fake_message(s, :source => u)
end
end
me = RemoteCtlPlugin.new
me.remote_map 'dispatch *string',
- :action => 'remote_command',
- :action_path => 'dispatch'
+ :action => 'remote_command'
me.default_auth('*', false)