diff options
author | BlueRaja <BlueRaja.admin@gmail.com> | 2013-05-29 06:58:14 -0500 |
---|---|---|
committer | BlueRaja <BlueRaja.admin@gmail.com> | 2013-05-29 06:58:14 -0500 |
commit | 550a14a669ca4271db64856ff7c7ce376fc2cd34 (patch) | |
tree | 09ec13ba6e09906aaded8d97a27205075ac6a879 /ajax | |
parent | 4a7b4e549fbbdb81aea8d837685ff83e0391ba86 (diff) | |
download | pathery-550a14a669ca4271db64856ff7c7ce376fc2cd34.tar.xz |
Set up foreign keys within the database. There is a small chance I may have broken emails, unlocks, or chat. Will test :)
Diffstat (limited to 'ajax')
-rw-r--r-- | ajax/chat.ajax.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ajax/chat.ajax.php b/ajax/chat.ajax.php index 07df57c..2561619 100644 --- a/ajax/chat.ajax.php +++ b/ajax/chat.ajax.php @@ -21,7 +21,7 @@ if (isset($_REQUEST['messages'])) { $r[0]['message'] = "You're talking too fast - or your internet is being too slow. *OR ARE YOU SPAMMING ON PURPOSE?! JERK!*";
$r[0]['secondsSince'] = 0;
$r[0]['displayName'] = 'SERVER';
- $r[0]['userID'] = -1;
+ $r[0]['userID'] = null;
echo json_encode($r);
exit;
}
@@ -40,7 +40,7 @@ $chatLockDown = false; // }
// }
-require('../includes/chats.php');
+require_once('../includes/chats.php');
$sent = false;
@@ -52,7 +52,7 @@ if (isset($_REQUEST['messages'])) { $r[0]['message'] = 'You have been muted; You are muted until '.$date." (The current time is: ".date("Y-m-d H:i:s").")";
$r[0]['secondsSince'] = 0;
$r[0]['displayName'] = 'SERVER';
- $r[0]['userID'] = -1;
+ $r[0]['userID'] = null;
echo json_encode($r);
exit;
}
@@ -62,7 +62,7 @@ if (isset($_REQUEST['messages'])) { $r[0]['message'] = 'Chat Lockdown has been activated. Messages are not being accepted';
$r[0]['secondsSince'] = 0;
$r[0]['displayName'] = 'SERVER';
- $r[0]['userID'] = -1;
+ $r[0]['userID'] = null;
echo json_encode($r);
exit;
}
@@ -78,7 +78,7 @@ if (isset($_REQUEST['messages'])) { //Admin only commands
if ($_SESSION['isAdmin'] == true) {
if ($command == 'say') {
- $insertID = addchat(-1, substr($message, 5));
+ $insertID = addchat(null, substr($message, 5));
}
}
//javascript based commands:
@@ -89,7 +89,7 @@ if (isset($_REQUEST['messages'])) { $r[0]['serverMessage'] = 'true';
$r[0]['message'] = "Commands: /help /time /spoiler /me. Surround text with ** for bold * for italics and ~~ for strikethrough. Chat by Pathery.com";
$r[0]['secondsSince'] = 0;
- $r[0]['userID'] = -1;
+ $r[0]['userID'] = null;
echo json_encode($r);
exit;
}
@@ -97,7 +97,7 @@ if (isset($_REQUEST['messages'])) { $r[0]['serverMessage'] = 'true';
$r[0]['message'] = "Server Time: ".date('l jS \of F Y h:i:s A');
$r[0]['secondsSince'] = 0;
- $r[0]['userID'] = -1;
+ $r[0]['userID'] = null;
echo json_encode($r);
exit;
}
@@ -157,6 +157,7 @@ function chatFilter($chat) { $chat = str_ireplace("sucks ass", "is dumb", $chat);
$chat = str_ireplace("suck ass", "are dumb", $chat);
$chat = str_ireplace("damnit", "do'h", $chat);
+ $chat = str_ireplace("sonuvabitch", "fiddlesticks", $chat);
$chat = str_ireplace("a bitch", "an engaging conversationalist", $chat);
$chat = str_ireplace("bitch", "engaging conversationalist", $chat);
@@ -182,6 +183,7 @@ function chatFilter($chat) { $chat = str_ireplace("i just pwned Snap", "Snap just totally pwned me ^^", $chat);
$chat = str_ireplace("i just pwned Blue", "Blue just epicly pwned me the with chat filter", $chat);
$chat = str_ireplace("language filter", "highly educated team of monkeys employed to filter bad language", $chat);
+ $chat = str_ireplace("chat filter", "highly educated team of monkeys employed to filter bad language", $chat);
return $chat;
}
?>
\ No newline at end of file |