Index: openacs-4/packages/chat/tcl/chat-ajax-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-ajax-procs.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 18 Sep 2018 14:46:56 -0000 1.17 +++ openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 19 Sep 2018 13:22:20 -0000 1.18 @@ -11,14 +11,14 @@ ::xo::ChatClass Chat -superclass ::xo::Chat Chat instproc init {} { - :instvar chat_id - if {[chat_room_exists_p $chat_id]} { - chat_room_get -room_id $chat_id -array c - set :login_messages_p $c(login_messages_p) - set :logout_messages_p $c(logout_messages_p) - set :timewindow $c(messages_time_window) - } - next + :instvar chat_id + if {[chat_room_exists_p $chat_id]} { + chat_room_get -room_id $chat_id -array c + set :login_messages_p $c(login_messages_p) + set :logout_messages_p $c(logout_messages_p) + set :timewindow $c(messages_time_window) + } + next } Chat instproc render {} { @@ -103,38 +103,44 @@ # if chat doesn't exist anymore, send a message that will inform # the user of being looking at an invalid chat Chat instproc check_valid_room {} { - if {![chat_room_exists_p [:chat_id]]} { - ns_return 500 text/plain "chat-errmsg: [_ chat.Room_not_found]" - ad_script_abort - } + if {![chat_room_exists_p [:chat_id]]} { + ns_return 500 text/plain "chat-errmsg: [_ chat.Room_not_found]" + ad_script_abort + } } Chat instproc get_new {} { - :check_valid_room - next + :check_valid_room + next } Chat instproc add_msg { - {-get_new:boolean true} - {-uid ""} - msg + {-get_new:boolean true} + {-uid ""} + msg } { - if {![chat_room_exists_p [:chat_id]]} { - return - } + if {![chat_room_exists_p [:chat_id]]} { + return + } - # ignore empty messages - if {$msg eq ""} return + # ignore empty messages + if {$msg eq ""} return - # code around expects the return value of the original method - set retval [next] + # code around expects the return value of the original method + set retval [next] - # This way messages can be persisted immediately every time a - # message is sent - if {[:current_message_valid]} { - chat_message_post [:chat_id] [:user_id] $msg 1 - } + # This way messages can be persisted immediately every time a + # message is sent + if {[:current_message_valid]} { + chat_message_post [:chat_id] [:user_id] $msg 1 + } - return $retval + return $retval } } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/chat/tcl/chat-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-init.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/chat/tcl/chat-init.tcl 5 Jun 2018 11:56:47 -0000 1.7 +++ openacs-4/packages/chat/tcl/chat-init.tcl 19 Sep 2018 13:22:20 -0000 1.8 @@ -16,3 +16,9 @@ ns_cache create chat_room_cache \ -size 350000 \ -timeout [expr {3600 * 24}] + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/chat/tcl/chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-procs.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/chat/tcl/chat-procs.tcl 28 Jun 2018 08:45:18 -0000 1.21 +++ openacs-4/packages/chat/tcl/chat-procs.tcl 19 Sep 2018 13:22:20 -0000 1.22 @@ -645,3 +645,9 @@ chat_room_message_delete $room_id } } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: