X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fremotectl.rb;h=d68177396fef5f8864bec3373743c3b40910c892;hb=9a565bfd48c59ac9c1b37d5afe9b8640889632ff;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..d6817739 100644 --- a/data/rbot/plugins/remotectl.rb +++ b/data/rbot/plugins/remotectl.rb @@ -15,7 +15,9 @@ 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) + u = @bot.server.user("remote:#{m.source.username}") + @bot.auth.login(u, m.source.username, m.source.password) + new_m = PrivMessage.new(@bot, @bot.server, u, @bot.myself, s) @bot.plugins.delegate "listen", new_m @bot.plugins.privmsg(new_m) end @@ -24,7 +26,6 @@ end me = RemoteCtlPlugin.new me.remote_map 'dispatch *string', - :action => 'remote_command', - :action_path => 'dispatch' + :action => 'remote_command' me.default_auth('*', false)