Created
January 14, 2009 18:16
-
-
Save hirose31/46989 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/examples/wig.rb b/examples/wig.rb | |
index 88f9169..ef096bc 100755 | |
--- a/examples/wig.rb | |
+++ b/examples/wig.rb | |
@@ -522,7 +522,12 @@ class WassrIrcGateway < Net::IRC::Server::Session | |
def check_friends | |
first = true unless @friends | |
@friends ||= [] | |
- friends = api("statuses/friends") | |
+ friends = [] | |
+ 1.upto(5) do |i| | |
+ f = api("statuses/friends", {"page" => i.to_s}) | |
+ friends += f | |
+ break if f.length < 100 | |
+ end | |
if first && !@opts.key?("athack") | |
@friends = friends | |
post server_name, RPL_NAMREPLY, @nick, "=", main_channel, @friends.map{|i| "@#{i["screen_name"]}" }.join(" ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment