diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-02-14 04:11:33 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-02-14 04:11:33 -0800 |
commit | 133c2dbbb90c489c95b1e7b50823e9e0cfe9c71f (patch) | |
tree | ea7409af6605eb1a5eeb19e15a1baae7fd1787c4 /includes | |
parent | c7c8e39f9fd438a8b6279cc7410a9ce1289a6418 (diff) | |
download | pathery-133c2dbbb90c489c95b1e7b50823e9e0cfe9c71f.tar.xz |
Mute-User and Lockdown for chat. :).
Diffstat (limited to 'includes')
-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 == '')
|