]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/remotectl.rb
script, rss plugins: raise if main data could not be restored from the registry
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / remotectl.rb
index cb7775e2835b4e6336fbc47943155e69f48ed693..5404438046afbb584e59a647f7c00ccb59d981f9 100644 (file)
@@ -15,7 +15,9 @@ class RemoteCtlPlugin < Plugin
 
     def remote_command(m, params)
         s = params[:string].to_s
-        new_m = PrivMessage.new(@bot, @bot.server, @bot.server.user('-remote.client-'), @bot.myself, 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