Thread: Char's Reseting.. password glitch?!?

Results 1 to 5 of 5
  1. #1 Char's Reseting.. password glitch?!? 
    Registered Member
    Join Date
    Apr 2008
    Posts
    199
    Thanks given
    8
    Thanks received
    8
    Rep Power
    50
    Server base: Dynasty..

    okay so.. if you create a account. then relog into that account with the wrong password.. it will let you Log into the account.. when u log into a account with the false password, it resets that account..
    how can this be fixed?

    i though maybe something like
    Code:
    if (playerPass != readcharfile.(Character-Password) { 
    return code 3;
    etc;
    }
    but i have no idea how to make it search the char file for the line with the password.
    or where the code would be placed (im guessing void Run)
    but i'm no-where near experienced enough to do what im trying to do here.
    so if someone could help me out, i would appreciate it a bunch!
     

  2. #2  
    Banned

    Join Date
    Dec 2008
    Posts
    3,004
    Thanks given
    10
    Thanks received
    198
    Rep Power
    0
    Honestly, do not use dynasty. Dynasty was not a very good source, the features may of been an impact towards you though. If you want a source that is stable and has features, use Riotscape.
     

  3. #3  
    Registered Member
    Join Date
    Apr 2008
    Posts
    199
    Thanks given
    8
    Thanks received
    8
    Rep Power
    50
    Quote Originally Posted by ~Vitiello~ View Post
    Honestly, do not use dynasty. Dynasty was not a very good source, the features may of been an impact towards you though. If you want a source that is stable and has features, use Riotscape.
    it may be a bad source, but if i use something that is stable and has tons of features the same as dynasty, i learn nothing. i would like to learn some stuff..
    and everyone saying dont use it, only makes me want to use it that much more..

    soo.. back on topic.
    how would you get it to read a line from a file? :O
     

  4. #4  
    damnant quod non intellegunt

    Mr Chainsaw's Avatar
    Join Date
    Sep 2006
    Age
    30
    Posts
    4,058
    Thanks given
    827
    Thanks received
    1,277
    Rep Power
    4664
    Get another source, DeltaCleaned for example.
     

  5. #5  
    Registered Member
    Its paris's Avatar
    Join Date
    Apr 2009
    Posts
    1,141
    Thanks given
    56
    Thanks received
    234
    Rep Power
    689
    The password verification should not happen in the run() method. Rather do it when you receive a login request.
    You'll have to do something similar as when loading a character (do this in a seperate method with a boolean return type for easy understandable code), but ONLY for the password.
    When that's read close the file (very important (might need a flush before too)). Then it's just a matter of comparing the given password with the read password.
    Like:
    Code:
    if(verifyPassword(givenPlayername, givenPassword)
         //password is okay.
    else
         //password is not okay.
    Code:
    private boolean verifyPassword(String givenPlayername, String givenPassword){
        String readpassword = "";
        //File reading bit here
        return givenPassword.equalsIgnoreCase(readpassword); //Any password fixing like space to underscore should be applied too (otherwise "pass word" will not equals "pass_word").
    }
    If they match, you may continue as it's done at the moment.
    If they don't match, you'll have to send a packet with the wrong password code in it (don't ask me which one it is).
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •