Just as a follow up, the process for generating random nicks is weakened by only using rand() the first time - if that's in use, the nicks will be predictable in a series, meaning a malicious user can register or link the next N nicks that will pop up and splat the same person repeatedly. Not nice.