diff --git a/dDashboardServer/static/js/chat-filter.js b/dDashboardServer/static/js/chat-filter.js index b97ec721a..b85226f2c 100644 --- a/dDashboardServer/static/js/chat-filter.js +++ b/dDashboardServer/static/js/chat-filter.js @@ -1,123 +1,265 @@ /** - * The Chat Filter page: words staff block or allow on top of the filter's files, and for a word, which recent chat it - * would have stopped (or which messages the filter stopped that contain it), and where it stands in the files. The files' - * allowed words can be browsed and copied into the Allowed list. Every change is applied in running worlds. + * The Chat Filter page: test a message against the filter, the staff Blocked and Allowed lists (search, paging, add, + * move and remove, each confirmed with what it changes in recent chat), and the filter's word files. */ (function () { 'use strict'; - var input = document.getElementById('wordInput'); - var lastSubmitter = null; + var page = document.getElementById('chatFilterPage'); + var canChat = !!page.dataset.canChat; + var PAGE = 50; + var REASONS = { + blocked_here: 'Blocked on the staff list', + allowed_here: 'Allowed on the staff list', + allow_file: 'In chatplus_en_us.txt', + character_name: 'An approved character name', + not_allowed: 'Not in chatplus_en_us.txt or the Allowed list', + block_file: 'In blocklist.dcf', + not_in_block_file: 'Not a blocked word', + no_block_file: 'No blocklist.dcf: free chat stops every word' + }; - function item(w) { - return '
' + esc(d.allowFile) + ': ' + (d.allowFileFound
+ ? esc(d.allowTotal) + ' words normal chat may use (from the client); ' + esc(d.onDashboard) + ' are on a staff list too, which wins.'
+ : 'could not be read. Set client_location.') + '' + esc(d.blockFile) + ': ' + (d.blockFileFound
+ ? esc(d.blockTotal) + ' words best friends\' free chat may not use. Stored as hashes, so they can\'t be listed; test a word to see if it is one.'
+ : 'not found next to the servers, so best friends\' free chat stops everything.') + 'Words added here go on top of the filter's files. Blocked words are stopped in every kind of chat,
- even when the files allow them. Allowed words can be used in normal (whitelisted) chat, like the words in chatplus_en_us.txt.
- Running worlds pick up changes straight away. Before blocking a word, check which recent messages it would have stopped.
Which words players may use in chat. Staff lists here override the word files. GM 2 and up skip the filter.
| Time | Where | From | Message |
|---|
| Word | Result | Why |
|---|
chatplus_en_us.txt.| Word | List | Added by | Added |
|---|