修复 TG 412 提示bug

pull/37/head
david082321 2 years ago committed by GitHub
parent cbc1d83688
commit 0dad27853c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -143,22 +143,27 @@ function check_412($output,$get_area){
$status = json_decode($output, true);
if (SAVE_CACHE == 0) {
if ($status['code'] == -412) {
file_get_contents(TG_BOT_API.'/'.TG_BOT_KEY.'/sendMessage?chat_id='.TG_CHAT_ID.'&text=破服务器412啦地区:' . $get_area);
$msg = '破服务器412啦地区:'.$get_area;
}
} else {
$latest_code = read_status($get_area);
if ($latest_code != $status['code']) {
if ($status['code'] == -412) {
file_get_contents(TG_BOT_API.'/'.TG_BOT_KEY.'/sendMessage?chat_id='.TG_CHAT_ID.'&text=破服务器412啦地区:' . $get_area);
$msg = '破服务器412啦地区:' . $get_area;
write_status($status['code'],$get_area);
} else {
if ($latest_code == -412) {
file_get_contents(TG_BOT_API.'/'.TG_BOT_KEY.'/sendMessage?chat_id='.TG_CHAT_ID.'&text=破服务器恢复啦,地区:' . $get_area);
$msg = '破服务器恢复啦,地区:' . $get_area;
}
write_status(0,$get_area);
}
}
}
try {
file_get_contents(TG_BOT_API.'/'.TG_BOT_KEY.'/sendMessage?chat_id='.TG_CHAT_ID.'&text='.$msg);
} catch (Exception $e) {
// 不做任何事
}
}
}

Loading…
Cancel
Save