소스 검색

Updated “ckrl()” to “ckratelimit.php” “lib” version

pezcurrel 2 주 전
부모
커밋
b24ee766bd
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      pfaltgall

+ 4 - 3
pfaltgall

@@ -56,8 +56,9 @@ token=as7f8a7s0d89f7as97df09a8s7d90f81jkl2h34lkj12h3jkl4
 ---
 
  Then run {$SCRIPTNAME} with the path of the configuration file you have
-created. This will create an «index.html» file that will be ready to be put
-where you want (you can also see it locally, obviously).
+created as an argument. This will create an «index.html» file in the current
+directory, that will be ready to be put where you want (you can also see it
+locally, obviously).
 
 [[[ OPTIONS ]]]
 
@@ -407,7 +408,7 @@ function eecho($text) {
 
 function ckrl($headers) {
 	$rl=ckratelimit($headers);
-	if ($rl['ok'] && $rl['sleep']>0) {
+	if ($rl['ok'] && $rl['remaining']==0) {
 		echo "\rInfo: reached rate limit, sleeping for {$rl['sleep']} second(s)... ";
 		sleep($rl['sleep']);
 		echo "\n";