Index: openacs-4/packages/chat/www/room-enter.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room-enter.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/chat/www/room-enter.tcl 7 Jun 2007 09:14:25 -0000 1.6 +++ openacs-4/packages/chat/www/room-enter.tcl 19 Nov 2007 01:14:16 -0000 1.7 @@ -9,7 +9,6 @@ } { room_id:integer,notnull client:trim - } set user_id [ad_conn user_id] @@ -20,7 +19,7 @@ ns_log notice "--query ban $ban_p: permission::permission_p -object_id $room_id -privilege chat_ban -party_id [ad_conn user_id]" set active [room_active_status $room_id] -if { ($read_p == "0" && $write_p == "0") || ($ban_p == "1") || ($active eq "f") } { +if { ($read_p == "0" && $write_p == "0") || ($ban_p == "1") || ($active == "f") } { #Display unauthorize privilege page. ad_returnredirect unauthorized ad_script_abort @@ -31,13 +30,12 @@ if {$default_client eq "java"} { chat_start_server } + switch $client { - "html" - "ajax" - "html-chat-script" { - ns_log Notice "YY room-enter: has_entered_the room" - chat_message_post $room_id $user_id "[_ chat.has_entered_the_room]." "1" - } + "html" - "ajax" - "html-chat-script" { + ns_log Notice "YY room-enter: has_entered_the room" + chat_message_post $room_id $user_id "[_ chat.has_entered_the_room]." "1" + } } - - ad_returnredirect "chat?room_id=$room_id&client=$client"