From e90a8d192446fce277dc3efe4f2913d5fecca0dc Mon Sep 17 00:00:00 2001 From: Snap Date: Tue, 28 Apr 2015 15:53:05 -0700 Subject: Chat improvements. Fixed "&P" or ";P" bug. Reduced size of chat-request size considerably with use of header_remove(); --- pages/chat.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'pages') diff --git a/pages/chat.php b/pages/chat.php index 4f10a1c..cc8d0eb 100644 --- a/pages/chat.php +++ b/pages/chat.php @@ -46,12 +46,13 @@ function getChatTimer() { //addChatMessage("Debug", "Chat timer called!"); } -pollChannelListTimer(); -function pollChannelListTimer() { - setTimeout("pollChannelListTimer()", channelTimerDelay); - pollChannelList(); -} +var pollChannelListTimer = setInterval(function () {pollChannelList()}, channelTimerDelay); +// pollChannelListTimer(); +// function pollChannelListTimer() { + // setTimeout("pollChannelListTimer()", channelTimerDelay); + // pollChannelList(); +// } var firstGetChat = true; function getChatDone(data) { @@ -212,7 +213,7 @@ function replaceSmileys(chat) { chat = chat.replace(/\:d/gi, ''); chat = chat.replace(/\:o/gi, ''); chat = chat.replace(/\:p/gi, ''); - chat = chat.replace(/;p/gi, ''); + chat = chat.replace(/;p/gi, ''); chat = chat.replace(/\:c/gi, ''); chat = chat.replace(/\:s/gi, ''); chat = chat.replace(/\>_\</g, ''); @@ -314,8 +315,11 @@ function channelListShow(JO) { // u.secFromLastActive could be used in here someplace.. + var dateEntered = new Date(); + dateEntered.setTime(dateEntered.getTime() + u.secFromEntered * 1000); + if (u.wallEmblem == undefined) u.wallEmblem = 'blank.png'; - p = p+ ""; + p = p+ ""; p = p+ ""; p = p+ "
"; -- cgit v1.2.3