Commit 1437503f authored by Nico Schallehn's avatar Nico Schallehn

bugfix James antwortet auf alle privaten Nachrichten die er erhält

parent d91181e2
...@@ -33,7 +33,7 @@ function ChatNachricht($text, $admin, $userchange ){ ...@@ -33,7 +33,7 @@ function ChatNachricht($text, $admin, $userchange ){
mysql_query("INSERT INTO chat (user_id, nachricht, userchange, admin, chat_time, privat) VALUES ('{$_SESSION['chatuserid']}', '$text', '$userchange', '$admin', '" . time() . "', '$UserID')"); mysql_query("INSERT INTO chat (user_id, nachricht, userchange, admin, chat_time, privat) VALUES ('{$_SESSION['chatuserid']}', '$text', '$userchange', '$admin', '" . time() . "', '$UserID')");
//echo "INSERT INTO chat (user_id, nachricht, userchange, admin, chat_time, privat) VALUES ('{$_SESSION['chatuserid']}', '$text', '$userchange', '$admin', '" . time() . "', '$UserID')"; //echo "INSERT INTO chat (user_id, nachricht, userchange, admin, chat_time, privat) VALUES ('{$_SESSION['chatuserid']}', '$text', '$userchange', '$admin', '" . time() . "', '$UserID')";
//mysql_query("UPDATE user SET chat = '".mysql_insert_id()."' WHERE id = '{$_SESSION['chatuserid']}'"); //mysql_query("UPDATE user SET chat = '".mysql_insert_id()."' WHERE id = '{$_SESSION['chatuserid']}'");
if (preg_match("/James/i",$text)) if ((preg_match("/James/i",$text)) OR ($UserID == 1))
{ {
$time = time()+1; $time = time()+1;
if (preg_match("/wie/i",$text) AND preg_match("/geht/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Mir geht es gut und dir ".IDtoUsername($_SESSION['chatuserid'])."?', '$admin', '$time')"); if (preg_match("/wie/i",$text) AND preg_match("/geht/i",$text)) mysql_query("INSERT INTO chat (user_id, nachricht, admin, chat_time) VALUES ('1', 'Mir geht es gut und dir ".IDtoUsername($_SESSION['chatuserid'])."?', '$admin', '$time')");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment