diff --git a/mod/chat/chatd.php b/mod/chat/chatd.php index 0bf0a812d72..21770cf87b0 100755 --- a/mod/chat/chatd.php +++ b/mod/chat/chatd.php @@ -531,7 +531,7 @@ class ChatDaemon { $this->dismiss_half($sessionid, false); $this->write_data($this->conn_sets[$sessionid][CHAT_CONNECTION_CHANNEL], $CHAT_HTMLHEAD_JS); $this->trace('Connection accepted: '.$this->conn_sets[$sessionid][CHAT_CONNECTION_CHANNEL].', SID: '.$sessionid.' UID: '.$chatuser->userid.' GID: '.intval($groupid), E_USER_WARNING); - +/* // Finally, broadcast the "entered the chat" message $msg = &New stdClass; @@ -544,7 +544,7 @@ class ChatDaemon { insert_record('chat_messages', $msg); $this->message_broadcast($msg, $this->sets_info[$sessionid]['user']); - +*/ return true; } @@ -973,7 +973,7 @@ while(true) { if($changed > 0) { // Let's see what it has to say - $data = socket_read($handle, 512); + $data = socket_read($handle, 2048); // should be more to prevent empty pages and repeated messages!! if(empty($data)) { continue; } diff --git a/mod/chat/db/mysql.php b/mod/chat/db/mysql.php index 7c0ebb6c513..9693b10a414 100644 --- a/mod/chat/db/mysql.php +++ b/mod/chat/db/mysql.php @@ -53,6 +53,11 @@ function chat_upgrade($oldversion) { modify_database('','ALTER TABLE prefix_chat_users ADD INDEX `groupid` (`groupid`);'); } + if ($oldversion < 2005020300) { + table_column('chat_users', '', 'course'); + table_column('chat_users', '', 'lang', 'varchar', '10', '', ''); + } + return true; } diff --git a/mod/chat/db/mysql.sql b/mod/chat/db/mysql.sql index 68365a8dd80..2972a0debca 100644 --- a/mod/chat/db/mysql.sql +++ b/mod/chat/db/mysql.sql @@ -52,6 +52,8 @@ CREATE TABLE `prefix_chat_users` ( `lastping` int(10) unsigned NOT NULL default '0', `lastmessageping` int(10) unsigned NOT NULL default '0', `sid` varchar(32) NOT NULL default '', + `course` int(10) NOT NULL default '0', + `lang` varchar(10) NOT NULL default '', PRIMARY KEY (`id`), KEY `userid` (`userid`), KEY `lastping` (`lastping`), diff --git a/mod/chat/db/oci8po.sql b/mod/chat/db/oci8po.sql index b31fa042800..e082c15661a 100755 --- a/mod/chat/db/oci8po.sql +++ b/mod/chat/db/oci8po.sql @@ -93,7 +93,9 @@ CREATE TABLE prefix_chat_users ( firstping number(10) default '0' not null, lastping number(10) default '0' not null, lastmessageping number(10) default '0' not null, - sid varchar2(32) default '' not null + sid varchar2(32) default '' not null, + course number(10) default '0' not null, + lang varchar2(10) default '' not null ); create index userid on prefix_chat_users(userid); diff --git a/mod/chat/db/postgres7.php b/mod/chat/db/postgres7.php index 23b683fe86a..86586390eb6 100644 --- a/mod/chat/db/postgres7.php +++ b/mod/chat/db/postgres7.php @@ -42,9 +42,13 @@ function chat_upgrade($oldversion) { modify_database('','CREATE INDEX prefix_chat_users_lastping_idx ON prefix_chat_users (lastping);'); } + if ($oldversion < 2005020300) { + table_column('chat_users', '', 'course'); + table_column('chat_users', '', 'lang', 'varchar', '10', '', ''); + } + return true; } ?> - diff --git a/mod/chat/db/postgres7.sql b/mod/chat/db/postgres7.sql index c1928e4af97..5d70f9af1a3 100644 --- a/mod/chat/db/postgres7.sql +++ b/mod/chat/db/postgres7.sql @@ -56,6 +56,8 @@ CREATE TABLE prefix_chat_users ( lastping integer NOT NULL default '0', lastmessageping integer NOT NULL default '0', sid varchar(32) NOT NULL default '', + course integer NOT NULL default '0', + lang varchar(10) NOT NULL default '', PRIMARY KEY (id) ); diff --git a/mod/chat/drawboard.php b/mod/chat/drawboard.php deleted file mode 100644 index 099b1e7c331..00000000000 --- a/mod/chat/drawboard.php +++ /dev/null @@ -1,38 +0,0 @@ - - - -
-