From 7b4bb520ba2beaf858d39bf16c2ea2722c135068 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 25 Aug 2004 14:20:54 +0000 Subject: [PATCH] Course passed properly to messages Old chat_users all deleted on startup --- mod/chat/chatd.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod/chat/chatd.php b/mod/chat/chatd.php index 1d8a94c0032..88a64c0e37c 100755 --- a/mod/chat/chatd.php +++ b/mod/chat/chatd.php @@ -29,6 +29,9 @@ set_magic_quotes_runtime(0); error_reporting(E_ALL); +/// Clear the decks of old stuff +delete_records('chat_users'); + function chat_empty_connection() { return array('sid' => NULL, 'handle' => NULL, 'ip' => NULL, 'port' => NULL, 'groupid' => NULL); } @@ -674,7 +677,7 @@ class ChatDaemon { { // Simply give them the message - $output = chat_format_message_manually($message, 0, $sender, $info['user'], $info['lang']); + $output = chat_format_message_manually($message, $this->sets_info[$sessionid]['courseid'], $sender, $info['user'], $info['lang']); $this->trace('Delivering message "'.$output->text.'" to '.$this->conn_sets[$sessionid][CHAT_CONNECTION_CHANNEL]); if($output->beep) {