I am still testing this for a more specific test case, but from what I can tell this is the bug:
If the randomly-generated nick happens to be the same as one already in use, the pop-up asks one to change it. However, if one cancels from there, one gets that nick and the existing user with that nick gets kicked out.
If a nick is not set as a param, then a user who cancels is left with a "blank nick" and pretty inoperable. That's fine.
However, if the nick clashes, or if a default hard-coded nick is passed in as a param to the constructor, the cancel does not work as expected.
Also, what snippet of code can I put in index.php that will quickly test if a nick is already in use and then do a specific action of my choosing, rather than popping up the dialog box.
thx