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.5.2.6 -r1.5.2.7 --- openacs-4/packages/chat/tcl/chat-procs.tcl 25 Apr 2006 10:43:50 -0000 1.5.2.6 +++ openacs-4/packages/chat/tcl/chat-procs.tcl 20 Jun 2006 00:28:19 -0000 1.5.2.7 @@ -281,6 +281,8 @@ } { Explicit ban user from this chat room. } { + util_memoize_flush \ + "permission::permission_p_not_cached -party_id $party_id -object_id $room_id -privilege chat_ban" db_exec_plsql ban_user {} } @@ -291,6 +293,8 @@ } { unban user from this chat room. } { + util_memoize_flush \ + "permission::permission_p_not_cached -party_id $party_id -object_id $room_id -privilege chat_ban" db_exec_plsql ban_user {} } Index: openacs-4/packages/chat/www/room-enter.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/room-enter.tcl,v diff -u -r1.3.2.2 -r1.3.2.3 --- openacs-4/packages/chat/www/room-enter.tcl 7 Apr 2006 16:59:52 -0000 1.3.2.2 +++ openacs-4/packages/chat/www/room-enter.tcl 20 Jun 2006 00:28:20 -0000 1.3.2.3 @@ -16,6 +16,7 @@ set read_p [permission::permission_p -object_id $room_id -privilege "chat_read"] set write_p [permission::permission_p -object_id $room_id -privilege "chat_write"] set ban_p [permission::permission_p -object_id $room_id -privilege "chat_ban"] +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 == "f") } { Index: openacs-4/packages/chat/www/search-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/search-2.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/chat/www/search-2.tcl 30 Mar 2006 09:15:12 -0000 1.1.2.1 +++ openacs-4/packages/chat/www/search-2.tcl 20 Jun 2006 00:28:20 -0000 1.1.2.2 @@ -23,7 +23,7 @@ # Check input. set exception_count 0 set exception_text "" -set SQL_LIMIT 10 +set SQL_LIMIT 20 set context [list [list "./" "Users"] "Search"] Index: openacs-4/packages/chat/www/search-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/search-3.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/chat/www/search-3.tcl 14 Mar 2006 12:16:09 -0000 1.1 +++ openacs-4/packages/chat/www/search-3.tcl 20 Jun 2006 00:28:20 -0000 1.1.2.1 @@ -6,7 +6,7 @@ party_id:integer,notnull } -if {[string equal $type "user"] == 1} { +if {$type eq "user"} { ad_require_permission $room_id chat_user_grant chat_user_grant $room_id $party_id } else { Index: openacs-4/packages/chat/www/ajax/chat.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/ajax/Attic/chat.js,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/chat/www/ajax/chat.js 7 Apr 2006 16:59:52 -0000 1.1.2.4 +++ openacs-4/packages/chat/www/ajax/chat.js 20 Jun 2006 00:28:20 -0000 1.1.2.5 @@ -186,7 +186,7 @@ // updateInterval = setInterval(updateDataConnections,5000); // } if (this.busy) { - alert("chatSendMsg conflict!"); + alert("chatSendMsg conflict! Maybe banned?"); } var msgField = document.getElementById('chatMsg'); if (msgField.value == '') { Index: openacs-4/packages/chat/www/ajax/chat.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/ajax/Attic/chat.tcl,v diff -u -r1.1.2.7 -r1.1.2.8 --- openacs-4/packages/chat/www/ajax/chat.tcl 13 Jun 2006 00:32:45 -0000 1.1.2.7 +++ openacs-4/packages/chat/www/ajax/chat.tcl 20 Jun 2006 00:28:20 -0000 1.1.2.8 @@ -11,6 +11,14 @@ {msg:optional,allhtml ""} } +set ban_p [permission::permission_p -object_id $id -privilege "chat_ban"] +if {$ban_p} { + ns_return 200 text/html "
\ +