From 8eb00284f0cf49331dc12aba05b2a345eba91935 Mon Sep 17 00:00:00 2001 From: dennydai Date: Tue, 17 May 2016 16:27:08 +0800 Subject: [PATCH] set timeout fix: flood after reboot --- classes/Telegram-Bot/init.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/Telegram-Bot/init.php b/classes/Telegram-Bot/init.php index 2216606..07af0be 100644 --- a/classes/Telegram-Bot/init.php +++ b/classes/Telegram-Bot/init.php @@ -1,7 +1,6 @@ 0) { @@ -9,9 +8,15 @@ if ($GET['message']['chat']['id'] > 0) { }else{ $isgroup = true; } + //reply to... $msgid = $GET['message']['message_id']; $from = $GET['message']['chat']['id']; - $text = $GET['message']['text']; + $date = $GET['message']['date']; + if ((time() - $date) > 120) { + $text = 'unset'; + }else { + $text = $GET['message']['text']; + } define('MSGID',$msgid); \ No newline at end of file