This is the first “challenge” post. It will give you tasks that you can do if you feel like it, exercises for the reader, you know…homework. This is based on the login functionality I gave code for in this post.
Perhaps these things won’t matter to your MUD, but I found myself doing them, but not finding them interesting enough to post about. So instead I’ll just tell you to do them if you like. (This way I’m also not leaving out any important corner cases from consideration.)
- If a player presses enter without typing a name at the name prompt, they probably want to quit. Disconnect them immediately.
- Whatever name a player types, treat it as the lower_case() version of itself.
- Do not accept blank (or very short) passwords.
- Stop appending an OID to the end of the player’s name. And, as a necessary consequence of that:
- If a player with a certain name is already logged on, and another logs in under the same name, disconnect the first player and let the second player take over the user object of the first player. Check out the useful efuns find_player() and remove_interactive().
- If two players try to create a character of the same name at about the same time, what will happen? Is that acceptable to you? If not, how could you fix it?