diff options
Diffstat (limited to 'includes/chats.php')
-rw-r--r-- | includes/chats.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/includes/chats.php b/includes/chats.php index 6a36fe3..ee222c9 100644 --- a/includes/chats.php +++ b/includes/chats.php @@ -7,6 +7,21 @@ include_once('sqli.php'); define('CHAT_ROWS_TO_KEEP', 50);
+function isMuted($userID) {
+ global $mysqli;
+
+ $sql = "SELECT `dateChatGaggedUntil` FROM `users`
+ WHERE `ID` = ?
+ AND `dateChatGaggedUntil` > CURDATE()";
+ $stmt = $mysqli->prepare($sql);
+ $stmt->bind_param("i", $userID);
+ $stmt->execute();
+ $stmt->bind_result($date);
+ $stmt->fetch();
+ if ($date) return $date;
+ else return false;
+}
+
function addChat($userID, $message) {
global $mysqli;
if ($message == '')
|