Skip to content

Instantly share code, notes, and snippets.

@hirose31
Created January 14, 2009 18:16
Show Gist options
  • Save hirose31/46989 to your computer and use it in GitHub Desktop.
Save hirose31/46989 to your computer and use it in GitHub Desktop.
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