瀏覽代碼

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";