X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fremotectl.rb;h=31d48fe397cbf22a0e059c71207a166d9da9c621;hb=16336b4a240a4265d1f2df1e30d7b68d3a924287;hp=b5b460fe296db8b57764488f42df11d4764fb068;hpb=15068f45e239c6e8fb9149215935c0d97927c304;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/remotectl.rb b/data/rbot/plugins/remotectl.rb index b5b460fe..31d48fe3 100644 --- a/data/rbot/plugins/remotectl.rb +++ b/data/rbot/plugins/remotectl.rb @@ -15,16 +15,15 @@ class RemoteCtlPlugin < Plugin 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)