Menu

#4 Empire creation should be smarter

open
sc-code (8)
2
2002-02-13
2000-10-07
Jerome Zago
No

----- How to reproduce the bug -----

Create an empire, say, "Lady Thismet".
Now login as " LaDy ThisMET ".

It asks you to create a new empire. But when you hit "Save Profile", it won't work, since " LaDy ThisMET " is considered the same as "Lady Thismet", therefore the empire creation is (rightfully) cancelled:
"Sorry... this empire name is already used. Please try again."

----- The problem -----

When I try to log in as " LaDy ThisMET ", I shouldn't go to the empire creation screen (useless), but log in as "Lady Thismet", providing the password is correct.

----- Suggested fix -----

Function sterilizeName () (line 745 of scv3209.lpc) should also be called in
login_player () (line 11146 of scv3209.lpc). For instance, replace
string name = id["variables"]["name"];
by:
string name = sterilizeName (id["variables"]["name"], 0);

And replace
return create_player(sterilizeName(name, 0), pass);
by:
return create_player(name, pass);

Discussion

  • Jerome Zago

    Jerome Zago - 2000-10-21
    • labels: 100100 --> sc-code
     
  • Andy Graves

    Andy Graves - 2000-12-07

    You say that attempting to log in with an empire name which differs from an existing empire only by case takes you to the 'Creating a New Empire' screen.

    As far as I can tell, this simply isn't true.

    You say that if the capitalisation of the empire name is wrong but the password is right, you should be logged in anyway.

    Okay, but I think most players can remember how they capitalised their names. Do you think a miscapitalised password should be accepted?

     
  • Jerome Zago

    Jerome Zago - 2002-02-13

    Logged In: YES
    user_id=25537

    Andy, try with leading and/or trailing spaces.

     
  • Jerome Zago

    Jerome Zago - 2002-02-13
    • priority: 4 --> 2
     

Log in to post a comment.