diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-02-24 03:39:15 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-02-24 03:39:15 -0800 |
commit | 2875c699c07de67e9f010d5610283ebcc43e50a7 (patch) | |
tree | 3db4b22fd780aab70a2387cf1d639136166da7c6 /ajax/chat.ajax.php | |
parent | 438184ffc7ec1e447668c22b09416c984a9c12f2 (diff) | |
download | pathery-2875c699c07de67e9f010d5610283ebcc43e50a7.tar.xz |
Added /spoiler command to chat - Fixed issue with 2 quick succession chats being very slow.
Diffstat (limited to 'ajax/chat.ajax.php')
-rw-r--r-- | ajax/chat.ajax.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ajax/chat.ajax.php b/ajax/chat.ajax.php index 02fc396..5ac77e4 100644 --- a/ajax/chat.ajax.php +++ b/ajax/chat.ajax.php @@ -50,9 +50,12 @@ if ($_REQUEST['messages']) { }
}
//Anyone commands:
+ if ($command == 'spoiler') {
+ $insertID = addchat($userID, $message);
+ }
if ($command == 'help') {
$r[0]['serverMessage'] = 'true';
- $r[0]['message'] = "Commands: /help /time . - Chat by Pathery.com";
+ $r[0]['message'] = "Commands: /help /time /spoiler . - Chat by Pathery.com";
$r[0]['secondsSince'] = 0;
$r[0]['userID'] = -1;
echo json_encode($r);
@@ -66,7 +69,7 @@ if ($_REQUEST['messages']) { echo json_encode($r);
exit;
}
- } else {
+ } else {
$insertID = addchat($userID, $message);
}
}
|