Enhance the login code

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?
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: