summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbettereveryloop.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/bettereveryloop.php b/bettereveryloop.php
index 067a549..90dac79 100755
--- a/bettereveryloop.php
+++ b/bettereveryloop.php
@@ -1,15 +1,17 @@
#!/usr/bin/env php
<?php
// how to write ugly code
- if ($argc != 4 )
- exit ($argv[0]." username password subreddit");
- require_once ("main.php" );
- $o = new oldredditClient( );
- $o-> setusername ($argv[1] );
- $o-> setpassword ($argv[2] );
- while (1 ){
- $o-> setflair ($argv[3] );
- sleep (5 );
+ if ($argc != 4 && $argc != 5 )
+ exit ($argv[0]." username password subreddit link" );
+ require_once ("main.php" );
+ $o = new oldredditClient( );
+ $o-> setusername ($argv[1] );
+ $o-> setpassword ($argv[2] );
+ while (1 ){
+ $o-> setflair ($argv[3] );
+ if ($argc == 5 )
+ $o-> setflair ($argv[3], null, null, $argv[4] );
+ sleep (8 );
}
// reddit is max 30 requests per minute tho
?>