]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
* apparently, synthetic privmsgs for remotectl are hard. may need some massive rework...
authorDmitry Kim <dmitry point kim at gmail point com>
Wed, 21 Mar 2007 15:28:05 +0000 (15:28 +0000)
committerDmitry Kim <dmitry point kim at gmail point com>
Wed, 21 Mar 2007 15:28:05 +0000 (15:28 +0000)
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