summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/rbot/plugins/twitter.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/data/rbot/plugins/twitter.rb b/data/rbot/plugins/twitter.rb
index a5ca23f8..94a1374e 100644
--- a/data/rbot/plugins/twitter.rb
+++ b/data/rbot/plugins/twitter.rb
@@ -62,7 +62,14 @@ class TwitterPlugin < Plugin
uri = "http://twitter.com/statuses/user_timeline/#{user}.xml?count=#{count}"
else
count = @bot.config['twitter.friends_status_count']
- uri = "http://twitter.com/statuses/friends_timeline/#{user}.xml"
+ auth = ""
+ if m.private?
+ auth << URI.escape(@registry[m.sourcenick + "_username"])
+ auth << ":"
+ auth << URI.escape(@registry[m.sourcenick + "_password"])
+ auth << "@"
+ end
+ uri = "http://#{auth}twitter.com/statuses/friends_timeline/#{user}.xml"
end
response = @bot.httputil.get(uri, :headers => @header, :cache => false)