diff options
| author | Jesse Morgan <jesse@jesterpm.net> | 2011-05-26 18:40:42 +0000 | 
|---|---|---|
| committer | Jesse Morgan <jesse@jesterpm.net> | 2011-05-26 18:40:42 +0000 | 
| commit | d6c61fb58c715d481c0bcd601ce8071f271d0d4f (patch) | |
| tree | fdf4fcd051ab709c3a4694bb24d4006eb4e412e4 | |
| parent | ce9d8e90a03229506f0471ddb110a0dd7a49d43d (diff) | |
Fixed following too many issue.
| -rw-r--r-- | JKTwitterBot/src/thebot.py | 14 | 
1 files changed, 9 insertions, 5 deletions
| diff --git a/JKTwitterBot/src/thebot.py b/JKTwitterBot/src/thebot.py index 678c95a..3a72915 100644 --- a/JKTwitterBot/src/thebot.py +++ b/JKTwitterBot/src/thebot.py @@ -131,7 +131,13 @@ def oursleep(amt):      else:
          time.sleep(amt)
 -            
 +def follow_more():
 +    if len(friends) > 0:
 +        for i in range(100):
 +            if len(friends) > 0:
 +                follow_user(friends.pop())
 +
 +
  #########################
  # Execution starts here #
  #########################
 @@ -192,10 +198,6 @@ if __name__ == '__main__':      # Prepare Eliza (code from the_shrink.py)
      doctor = eliza.eliza()
 -    # adds all friends from friends.txt
 -    for friend in friends: 
 -        follow_user(friend)
 -       
      while True:
          # We sleep between midnight at 6 am.
          hour = datetime.now().hour
 @@ -203,6 +205,8 @@ if __name__ == '__main__':              # Sleep until 6 am.
              oursleep((6 - hour) * 3600)
 +        # Follow 100 more users
 +        follow_more()
          # Reply to tweets directed to us
          reply_to_tweets()
 | 
