Add conditions to add to db.

This commit is contained in:
Ceda EI 2018-07-22 02:16:25 +05:30
parent 82fdb73ad7
commit 00c7cb05c2
1 changed files with 9 additions and 0 deletions

View File

@ -59,4 +59,13 @@ if (!isset($decoded->{"message"}->{"text"})){
$text = $decoded->{"message"}->{"text"};
if (substr_count($text, " was completely clueless. Village was successfully pillaged. You feel pleased about yourself.") == 1){
add_to_db(1);
}
elseif (substr_count($text, "noticed you and nearly beat you to death.") == 1){
add_to_db(0);
}
elseif (substr_count($text, "tried stopping you, but you were stronger.") == 1){
add_to_db(0);
}
?>