add 'rules_change' functionality
[brisk.git] / TODO.txt
1  TODO |
2 ------+
3
4   BUGS |
5  ------+
6    - cache data structure for tournments
7      . reload on SIGHUP
8    - new rules for 'together for fun' turnment
9    - select tournment dropdown menu (send a 'cont' like message for each change)
10    - show current rules
11
12    DONE - Not sequence of 3 same chars
13    DONE   . check server side with test
14    DONE - Global vars checker
15    <release>
16    - usermgmt: add user delete
17    DONE - 10002 message when already clicked
18    DONE - trim spaces in apprentice form
19    DONE - Remove books from chat
20    DONE - usermgmt: add email
21
22
23   FEATURES |
24  ----------+
25    WIP * inherited info
26    * Users Network construction
27      DONE - sql
28      DONE - dbase API
29      DONE - add apprentices tables
30      DONE - remove entry when set unknown
31      DONE - enhance info interface
32        DONE . SQL to show current evaluation
33        DONE . disable parts of interface
34        WIP . add title to items
35        . fix SELECT 
36      <release>
37      - minisplash at end of the match
38      - differentiate table authorization
39    * add new kind of isolation for apprentice
40
41    * Double click on chat to open preferences
42
43    * APPRENTICE
44      Phase2
45      DONE - match counters (part 2)
46        DONE . migration script for old users
47      - guarantee for apprentice
48
49
50
51 ---------
52    - APPRENTICE
53      Phase2
54      DONE - match counters (part 2)
55        DONE . migration script for old users
56
57    - APPRENTICE
58      Phase1
59      DONE - correggere minuta giornaliera
60      DONE - aggiungere mask per autogar
61      DONE - correggere email per apprentice
62      DONE - verificare la variabile per tout IP ban apprentice
63      DONE - chat ban for apprentice
64
65      DONE - ip check and time limit
66        DONE . sql
67          DONE . temporary table limitation
68        DONE . message
69      DONE - usermgmt extension
70      DONE - add close button
71      DONE - add apprentice icon
72      DONE - match counters (part 1)
73        DONE . sql for match counters
74      DONE - new info system
75        DONE - click management
76        DONE - show user info (RO)
77          DONE - require command/info
78          DONE - fix fiverank table
79          DONE - fix bug with bitwise
80          DONE - fix layout of tables
81      DONE - aggiungere books.png
82
83     - MENTORS
84      - listen all
85
86    - BUDDY LIST
87      - white list
88      - black list
89      - delegate
90
91    - DEANONYMIZER
92       . study how to move login delta injection
93
94    - CERTIFICATIONS
95       DONE . Guarantes for certified-only (buttons choice managed)
96       DONE . Tables for certified-only
97       . Term Of Use
98       . Placing for certified-only
99
100    - IP CLASSES BAN
101       DONE . BAN and BLACK lists added
102       DONE . update method to SIGHUP manager
103       DONE . create constructor refactored
104
105    - PLACEMENT-NORMALIZATION
106       DONE . Normalize previous points
107       DONE . Denormalize "Info" view
108       DONE . Denormalize explained matches
109       DONE . Check placement
110       DONE . Distinguish between inherited mult and local mult
111
112    - AUTO-MAINTENANCE
113      DONE . Terms Of Service acceptance
114        DONE . print date of hard switch
115        DONE . TOS version
116        DONE . user TOS acceptance (db field)
117        DONE . show TOS ([show me later, yes, no]/[yes, no])
118        DONE . switch-off date
119        DONE . manage accept
120        DONE . manage refuse
121        DONE . show current TOS
122        DONE . disable user reason integer field and remove SUSPEND state (db, php)
123        DONE . fix tos layout
124        DONE . opt - download TOS
125        . opt - checkbox for anonimous users with message when not checked
126        . opt - button enabled when arrived to the bottom of the TOS only
127        . opt - check TOS version between config file and TOS file
128      DONE . show guarantee (/guar <login> command)
129        DONE . multi-language
130        DONE . command documentation
131        DONE . manage disagreeding users investigation
132        DONE . self guaranteed
133      . DONE New Users Guarantee Procedure
134        . DONE Change guarantee workflow
135        . DONE Db update
136
137          UserA                 UserB                      Admin
138 -------------------------------------------------------------------------
139       guarante UserB
140            |
141            v
142       Save on mail
143          table,
144       email to UserB
145     (Disabled, MAILED)
146 -------------------------------------------------------------------------
147                            Receive email
148                            to check address
149                                  |
150                                  v
151                            Click on link
152                                  |
153                                  v
154                            Check on mail
155                                table,
156                            update user status,
157                            delete mail rec
158                           (Disabled, TOBECHK)
159 -------------------------------------------------------------------------
160                                                        admin panel
161                                                        accept user
162                                                             |
163                                                             v
164                                                      send email with
165                                                      password,
166                                                      update user status
167                                                       (Normal, NONE)
168 -------------------------------------------------------------------------
169                            Receive email
170                            with password
171 -------------------------------------------------------------------------
172
173      DONE . More user info in the list
174      DONE . Manage date to display when a user was required
175      . Email-address expiration check
176      . Account expiration
177
178
179    DONE - CONTINUE FEATURE
180      DONE . replace explicit strings with multilanguage array
181      DONE . add a php downloader with filtering on allowed requests
182      DONE . save points every game
183      DONE . modify points calculation to include order and mazzo
184      DONE . exclude not standard types from statistics
185          DONE . daily reports (1 for each active tournament)
186          DONE . monthly stats (for normal match only)
187      DONE . show current match ID when created
188      DONE . add info about continue to the info page
189      DONE . add command to continue
190          DONE . check consistency of the request
191      DONE . rearrange users and game status to continue the selected match
192      DONE . investigate user reordering ??
193
194    - WEBSOCKET TRANSPORT
195      . refactoring $enc attribute management
196      DONE . reintroduced $enc = 'plain' for websocket
197      DONE . fallback for not correct WS version
198      DONE . fini of ws stream
199      DONE . reactivate compression
200      DONE . fix xynt_test01
201      DONE M2: brisk working
202      DONE . manage multiport apache config
203      DONE . manage headers correctly in sac-a-push
204      DONE . manage transport.close method where required
205      DONE . xynt_stream: manage fallback to multiple ports
206      DONE . manage fini for ws
207      POST . server: manage input data from clients
208      POST . manage ping/pong (seems not required)
209
210      DONE . client (xynt_streaming.js)
211      DONE . server (transport.phh)
212
213      DONE M1: xynt_test01.php working
214
215
216    - improved S
217      . db update (add components, maybe single string)
218      . filter in index.php
219      . filter in index_wr.php
220
221    - prefs API:
222      . prefs_assign(content): assign json content as output var
223      . prefs_apply(prefs_new): apply new content to g_prefs and system
224      . prefs_load(content): load json content and apply to g_prefs and system
225
226      . prefs_update: update preferences temporarly
227      . prefs_save: save to the server the new prefs
228
229    - preferences (listen into preferences)
230         // js var, volatile server, (db server || cookie)
231         temporary: js var, volatile server
232         permanent: js var, volatile server, (db server || cookie)
233
234      . data from db OR, if missing, from cookies
235
236      . update values
237      . database change
238      . MANAGE NOT AUTH USERS
239
240    - preferences (with "modifiable S")
241      . Mod. S: new flag into database
242      . graph infrastructure
243      . new box to edit color
244
245   MAJOR |
246  -------+
247    - BUG: some connection to the named socket fails
248    - Not simultaneous more then one stream
249
250
251   MINOR |
252  -------+
253    WIP - try to be more antivirus-friendly
254    - multiple rows between games
255    - packetize and automatize php-ancillary and apache module
256    - DISABLED_TO_FIX: DNS access (perform blocking dns requests, must be fixed)
257
258
259   DONE |
260  ------+
261    DONE - temporarly server hung not reflected on user timeouts
262    DONE - timeouted users are still be able to sit down (only the first at the table is banned)
263    DONE - page still opened after the server restart
264    DONE - log_legal address fix
265    DONE - manage too fast reload in xynt-streaming
266    DONE - add xhr as transport layer and manage different streams better
267    TEST - BUG: pari + 72 non fa 4x ma attualmente fa 3x, da correggere
268    TEST - BUG: lurker are logged out (and remain a pending socket opened (look the spush log)
269    DONE - save/restore database
270    DONE - into the room local step remains -1
271    DONE - centralize all '<script ...' incapsulation to allow multiple transport system.
272    DONE - BUG: access with password from 2 diff browsers the second go in strange "page not found" 
273           in the first tentative, the second works
274    DONE - BUG: access with password from 2 diff browsers place the first in a strict loop (the 
275           problem was a call to a static parent method instead of the overrided child method,
276           substitute self:: with the dynamically get class::)
277    DONE - garbage management
278
279    DONE/FROZEN - problem with getpeer (HOSTADDR)
280
281    DONE - slow cards distribution
282    DONE - substr to mb_substr
283    DONE - parametrizations:
284           . parametrization of $DOCUMENT_ROOT  var in brisk-spush.phh file
285           . parametrization of SITE_PREFIX(_LEN) define
286           . move the name of the named socket into the configuration file
287    DONE - manage and test cross forwarder between table and room
288    DONE - setcookie (for tables only and persist prefs)
289    DONE - images flickering on slow windows: try to poll stream every 300 ms (seems to be download problem)
290    DONE - database connection fails after a while, check close and try PGSQL_CONNECT_FORCE_NEW.
291    DONE - unneeded garbage_time.expired access
292    DONE - BUG: fast loop on stream index_rd_ifra page (js watchdog start without timeout corrupt counts)
293    DONE - BUG: logout failed (fixed with a garbage_collector wrapper at sac-a-push level
294    DONE - 404 wrong page management (remove directories redirections (es. brisk/))
295    DONE - configuration file management
296    DONE - app level keep-alive
297    DONE - index_wr other issues
298    DONE - from room to table
299    DONE - from table to room
300    DONE - chunked
301    DONE - bug: read from a not resource handle (already closed because a new socket substitute it)
302    DONE - partial write for normal page management
303    DONE - index_rd_ifra: last_clean issue
304    DONE - fwrite failed error management (select, buffer where store unsent data, and fwrite check and retry)
305    DONE - bug: after restart index_rd.php receive from prev clients a lot of req
306    DONE - index_wr.php::chat
307    DONE - index_wr.php::exit
308    DONE - index_rd.php porting
309    DONE - generic var management from internet
310    DONE - index.php auth part
311    ABRT - index_wr.php::reload - reload is js-only function
312    ABRT - keepalive management - not interesting for our purposes
313
314  BRISK4 (mammuth)
315  ======
316
317  - STEP MANAGEMENT VERIFY
318  Slim Paragraph
319  DONE - move the garbage timeout on file
320  DONE - in index_rd load all data only when required
321  - briskin5 alignment
322    DONE . extern del garb_timeout
323    DONE . user_load parameters verify
324    DONE . Bin5::load_data and Bin5::save_data refactoring with
325           data split
326    . move many function into "Bin5 class"
327  - garbaging of .step files
328
329  DB: - initial usage
330      DONE - configurabilitĂ  file o db
331      DONE - aggiornare le funz di gestione db in modo che prevedano anche il flag DISABLE
332      DONE - travasatore file to pg
333        DONE - travaso punteggi
334        DONE - memorizzazione nuovi i punteggi nel db
335        DONE - gestione classifiche in SQL
336          DONE - produrle
337          DONE - mostrarle
338
339      STEP 1.1
340        DONE - points archiver
341
342      STEP 1.2
343        DONE - partial usability if database go down.
344
345      STEP 1.5
346      - sistema di inserimento nuovi utenti (riversatore da form di inserimento)
347
348      STEP 2
349      - modifica password   
350      - ripristino password 
351
352      STEP 3
353      - comunicazioni di aggiornamento (stato salvato sul server) 
354
355  DONE - var $G_base aggiunta per gestire include in include da path differenti
356
357  BRISK3 (trusty)
358  ======
359   DONE - donameter
360     DONE - G_donors
361     DONE (WOW!) - js object with infos
362     DONE - main logic at login (cookie check in index_rd.php; show_message and createCookie via snippets with block
363            to prevent fast reload)
364     DONE - cookie per non assillare e visualizz.
365     DONE - graphical donameter
366     WIP content (in conf.)
367
368   DONE - numero di tavoli auth-only nel .brisk-install
369   - isolation
370     TEST - ricalcolo delle persone in piedi quando si cambia modalitĂ 
371     DONE - se si e' in isolation non si può cambiare nick perdendo l' auth
372     DONE - non leggere le chat di quelli non autenticati (in isolation)
373     DONE - regole per passare alla modalita' (in piedi o ai tavoli autenticati) 
374     DONE - treni non auth da nascondere 
375     DONE - verso gli altri ??: uguale a prima
376
377   finire multilingua (briskin5/index_wr.php e altri se ce ne sono)
378   coniglio
379   only auth strictly
380   placing limits to config file
381
382 Dunque, 
383
384 - come vengono aggiornate le classifiche: ogni giorno alle 23:58
385
386 - cosa cambia tra le tre coppie di classifiche: 
387   ci sono le classifiche dell' ultima settimana, quelle dell' ultimo mese,  e quelle dell' ultimo trimestre,
388   per ognuno di questi lassi di tempo poi c'è la classifica di chi ha giocato piĂą di TOT partite o meno di TOT partite, con TOT che cambia a seconda del lasso di tempo.
389
390 - come vengono calcolate le classifiche: per ogni utente vengono presi tutti i punti fatti ai tavoli con lucchetto nel lasso di tempo preso in considerazione (ultima settimana, ultimo mese o ultimo trimestre), sommati e divisi per il numero di partite fatte in quello stesso lasso di tempo per normalizzare i valori; poi siccome la gente quando vede 0.18734 sbarella ho deciso di moltiplicare il tutto per 100.
391
392 Un esempio per chiarire:
393
394   l'utente 'pippo' che Ă¨ nuovo gioca 4 partite nell'ultima settimana con i seguenti punteggi:
395     -2, 1, 2, 1
396   lo score viene { [ (-2) + (1) + (2) + (1) ] / 4 }  * 100 = 50.0
397   
398   a paritĂ  di score tra utenti va piĂą in alto chi ha giocato piĂą partite.
399
400 Se dopo quelle 4 partite 'pippo' non ne giocherĂ  piĂą, passata una settimana dall'ultima giocata 
401 sparirĂ  dalla classifica settimanale e rimarrĂ  in quelle mensili e trimestrali.
402
403
404   
405
406
407
408
409  BUG
410  ---
411  
412   DONE - paste da demauroparavia
413   DONE - recupero partita per re-login con password
414   DONE - problema "|" nei nomi (manca enhance degli script lato server)
415   - problema col treno se mouse sopra mentre stringe (verif)
416   
417  MINOR
418  -----
419
420  NORMAL
421  ------
422
423   - win test
424   WIP - /listen 
425     DONE - skin della textarea
426     DONE - set cookie 
427     DONE - init client (read from cookie) - ALWAYS BY SERVER
428     DONE - init server
429     DONE - after cookie check auth-only when no-auth case
430     DONE - aggiungi info accanto a "Chat"
431   DONE - /mesgtoadm
432   DONE - img dei comandi
433
434   DONE - form per garantire utenti (accoda in un file nel formato corretto)
435   DONE -   process request
436   DONE -   show form
437   DONE -   close butt
438   DONE -   submit form
439   DONE -   process form js side 
440   DONE -   process form
441   DONE -   documentazione in help
442
443   DONE - user status
444
445   DONE - aggiornare help
446   DONE -   overflow management
447   DONE -   for status
448   -   for password
449
450   DONE - reload home
451   - notify for long pages
452
453   - buddy list
454   - silenziastolti vari (fino al buddy import)
455   - restrict challenge per IP
456   - restricted charset for login
457   - watchdog
458
459   - db (minimal)
460     - db admin page
461     - user db admin
462     - use db 
463     - admin db
464
465     - studiare un anti-dos
466   - login modify
467  DONE  - db (fake)
468  DONE  - display auth
469     - manage preferences 
470
471  minor
472  -----
473    - auth after login
474
475 ----- done ------
476
477  BUG
478  ---
479   DONE   righe troncate
480   DONE - questione "a monte" che:
481   DONE   - lascia fuori il bottone
482   DONE   - scrive &agrave e compagnia
483   DONE - refresh act_table when unauthorized
484   DONE - problema ghost autenticato (ne prendi il posto ovunque sia)
485
486  MINOR
487  -----
488   DONE - refactoring of the owner name (auth attr for owner name)
489   DONE   - room
490   DONE     - at chat input line 
491   DONE     - in the chat output line
492   DONE     - deauth management
493   DONE - table
494   DONE   - at chat input line
495   DONE   - in the chat output line
496   DONE   - for user area of other users
497   DONE   - deauth management
498   DONE - alart to one user
499
500
501  NORMAL
502  ------
503   DONE - strong ban: "expire time|IP|session|(nick if authenticated)"
504   DONE   - login: se auth      -  verifica solo gli expire per quel nick
505   DONE   -        se non auth  -  verifica gli expire per IP e sessione
506   DONE   - riscrivere messaggi
507
508   DONE - login 
509   DONE   - se pass:
510   DONE     - richiede per l' utente un token (tutta la parte backend va un minimo studiata)
511   DONE     - lo legge, ci hasha la password
512   DONE     - invia la pass al server hashata
513   DONE   - se non pass:
514   DONE     - check del login e return corretto
515   DONE     - oggetto in shm single table con ( "ip", "login", timestamp ) e suo management
516   DONE     - rename ghost if logged
517   DONE     - onunload_cb e onbeforeunload_cb !!! 
518   DONE   - da change attrs a change class (input field)
519   DONE     - colore del bg per arrivare ad essere omogeneo
520   DONE     - cambiare path e file di config
521   DONE   - login with or without pass
522   DONE   - registered nick notice (METTERE IL MSG NELLA PAG DI LOGIN)
523   DONE     - segnalare tavoli solo per auth
524   DONE     - rename restriction at auth table
525   DONE     - change nick (strcasecmp)
526   DONE   - refact js tables to handle flags
527   DONE - room javascript refactoring
528
529   DONE - work background
530   DONE - reserved tables
531
532
533  BRISK2 (spawn)
534  ======
535
536    
537    URGENT - tables spawn
538             DONE - link with photos
539             DONE - top banner in Etc file
540             DONE - spawn of a table
541             DONE - data to cookies (removed table_idx from xhr calls also)
542             DONE - set subst to shutdowner/shutdowned
543             DONE - return to index.php
544             DONE - game's token
545             DONE - recover of corrupted table data
546             DONE - closure of a table
547             DONE - flush of the table
548             DONE - security checks for right scope access
549             DONE - garbage collector management
550             DONE -    recursive garbage - howto ?
551             DONE - stat & subst in browser
552             DONE - laccwr setting and exit if all players are unactive for some time
553             DONE - the list of test case
554             DONE - shm dimension
555             DONE - remove unused parts
556             DONE - move images
557             DONE - optimizations
558             DONE - cambiare titolo al tavolo
559             DONE - shutdowning lock tables
560             DONE - topbanner
561             DONE - public announcements
562             DONE - 10 sec to exit from table
563
564             FAR - inheritances
565    
566    TRAIN  -  DONE - add again in reload   
567              DONE - wag_set refact
568              DONE - filtra char speciali per title
569              DONE - chatt_send refact 
570              DONE - elenco dei giocatori
571              DONE - documentazione online
572              DONE - timeout management     
573              LATER - border color a muzzo
574        
575    NORM   - testament
576    NORM   - public announcements
577    NORM   - 10 sec to exit from table
578    NORM   - moving label for tables click
579
580 ----------------- join -----------------
581    NORM   - map
582
583    NORM   - restart preload img
584    NORM   - tools dir with a main and some pages where check briscola tools.
585    NORM   - watchdog
586
587    NORM   - chat vecchie in reload (forse)
588
589  MIDDLE TODO
590  ===========
591
592    - user assistant (with button to enable disable)
593    - documentation
594
595
596  FAR TODO
597  ========
598    NORM - internationalization
599    NORM - img -> div + css
600    
601  WEB
602  ===
603
604    - link to stable/unstable
605
606 -------------------------------------------------------------------
607  DONE
608  ====
609
610    ABORTED - asta: highlight buttons (css hover) - change pointer when over
611    DONE - step proxy
612    DONE - special chars in js
613    DONE - ban temporaneo dai tavoli
614    DONE - flash player to play sound
615    DONEBUG - (aum. il timeout) - carte giocate che restano girate
616          Sembra non migliorare di molto la cosa, gestita la cache
617          correttamente, sono apposto.
618
619    DONE - one player reject a game, to less points (<= 2)
620    DONE - help page
621    DONE - test di download per la cache
622    DONE - se passano tutti tranne l'ultimo l'asta va al penultimo.
623           Corretto il codice, occorre verificare se questo
624           ingenera qualche problema.
625    DONE - raddoppiato il numero di righe nella chat
626    DONE - corretto bug del /nick
627    DONE - carosello pubblicitĂ  altout
628    DONE - smammamorti
629    DONE - unload of the stream
630    DONE - standup centrati
631    DONE - current player - in info
632    DONE - HELP butt con ABOUT, REGOLE, VERSIONE
633    DONE - welcome lines in the chats (room and table)
634    DONE - welcome lines in the chats (room and table)
635    DONE - nomi in primo piano se vai sul quadrato   
636    DONE - to pass explicit config file to INSTALL.sh
637    DONE - flag to create a config file
638    ABRT - bottoni => immagini
639    DONE - aggiungere bottone al login
640    DONE - nomi in primo piano se vai sul quadrato   
641    DONE - installer to set cookie path
642    DONE - change name
643    DONE - automatic and manual logout
644    DONE - cache problems solved via .htaccess
645    DONE - all players out of the auction
646    DONE - time to send cards
647    DONE - hide cards before sends at a new game
648    DONE - well recognization of the browser and O.S.
649    DONE - login consistency !!!!
650    DONE - functionalization of garbage
651    DONE - call garbage function into login
652    DONE - game
653    DONE - manage the reload from scratch of the table page
654    DONE - table reset
655    DONE - sendcard => card_send(idx, ....)
656    DONE - show table for game
657    DONE - points calculation
658    DONE - make-up of the chooser
659    DONE - where place the briscola on the table
660    DONE - users info
661    DONE - show current auction position
662    DONE - table with internal management of the transition between pages.
663    DONE - server side page abort management  
664    DONE - cookie problem with Ajax
665    DONE - spostare il tasto "esco"
666    DONE - to pass explicit config file to INSTALL.sh 
667    DONE - 8 tables
668    DONE - safety out management
669    DONE - info enhancement and related button (how win the last game and
670           with how much points ?)
671
672  WEB
673    DONE - homepage
674    DONE - screenshots
675
676 DOC
677    CHAPTERS
678       HTTP Streaming
679       Local serializer
680       Database on shmem
681       Page abort (reload on http streaming case)
682       Chat
683       Cookies management
684       CSS tricks
685
686 CHECK ON NEW SERVERS
687 .htaccess AllowOverwrite mode for Cache-Control directive
688
689
690
691
692 */
693