added chat commands and fixed /nick problem

/nick and /register would occasionally cause the server to broadcast
garbled characters to users after validating a login, because the client-side
hashing algorithm might generate EOL bytes; the adjusted algorithm should
avoid this, but it comes at the price of not being backward-compatible,
so you should delete your existing server.db upon upgrading to this version.