Thread: How to stop "already logged in"

Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1 How to stop "already logged in" 
    lol3
    Guest
    Put this:
    Code:
    world.kickPlayer(result.getString("user"), p);
    Between:
    Code:
    if(result.getInt("loggedin") == 1) {
    				return 4;
    Like so:
    Code:
    if(result.getInt("loggedin") == 1) {
    			world.kickPlayer(result.getString("user"), p);
    				return 4;
    				}
    BTW this is in your io folder, in the PlayerLoader.java
     

  2. #2  
    anc13nts
    Guest
    Well... I would say good job but I tested it and it gets no errors but...
    I tried this I loaded 2 clients logged in on my acc then tried logging in on the other client with the same acc and It just kicked my other acc.
    But then if someone found out another players password and wanted to steal there items they would easily be able to then because all they would have to do is try and log in and it will kick the player and then they are in..
     

  3. #3  
    Registered Member
    Lil Str Kid's Avatar
    Join Date
    Jul 2007
    Age
    31
    Posts
    1,302
    Thanks given
    169
    Thanks received
    71
    Rep Power
    260
    rofl epic fail
     

  4. #4  
    Registered Member
    cellkyborg's Avatar
    Join Date
    Jun 2008
    Posts
    149
    Thanks given
    0
    Thanks received
    0
    Rep Power
    86
    Just make a server-side ping. f.e Everytime you call fillInStream (or whatever method that reads data from input stream) set the current time into a variable:
    1) add "private long lastTimeDataReceived;" to your player class
    2) find fillInStream method (or w/e ...) and add
    Code:
    lastTimeDataReceived = System.getCurrentTimeMillis();
    under the statement:
    Code:
    private void fillInStream(...) {
       lastTimeDataReceived = System.getCurrentTimeMillis();
       /*
        * Here goes original code
        */
    }
    3) add timecheck to the player processing method:
    Code:
     
    if (System.currentTimeMillis() - lastTimeDataReceived > 60000) {
    //do disconnect f.e: 
    //disconnect();
    //destroyMe = true;
    }
    Special thanks for 504 map data (not full though):
    DJ Icey & Impulser: Member areas;
    psyhoman & Matthew Carter: free world;
     

  5. #5  
    anc13nts
    Guest
    yea thats easier thats what I had in the first place lol
     

  6. #6  
    lol3
    Guest
    anc13nts:

    If you let someone get your pass then you're an idiot. Also, it's not like they couldn't turn autologin on and wait for you to log out or wait for the server to crash...

    Also, I highly doubt you had the code that cellkyborg posted, you are a complete moron, and asked for help on things that a 7 yr old can easily figure out.

    cellkyborg:

    I don't see a point in adding extra code when it can be done in one line, that is only executed when needed. Also, by adding more system time checks, setting of variables, and if-statements you are causing unnecessary lag, it may be minuscule, but it adds up. Also, it doesn't eliminate the "account already logged in" problem, it just reduces the time that you have to wait to a minute, and is checking every time the void is run, which can be quite a lot, especially when you have a lot of people online.

    In short, I don't see how your way can possibly be better, because it causes more lag, and waste of system resources that may or may not be noticeable to you. Therefore, I challenge you to explain how your code is superior.
     

  7. #7  
    anc13nts
    Guest
    Quote Originally Posted by lol3 View Post
    anc13nts:

    If you let someone get your pass then you're an idiot. Also, it's not like they couldn't turn autologin on and wait for you to log out or wait for the server to crash...

    Also, I highly doubt you had the code that cellkyborg posted, you are a complete moron, and asked for help on things that a 7 yr old can easily figure out.

    cellkyborg:

    I don't see a point in adding extra code when it can be done in one line, that is only executed when needed. Also, by adding more system time checks, setting of variables, and if-statements you are causing unnecessary lag, it may be minuscule, but it adds up. Also, it doesn't eliminate the "account already logged in" problem, it just reduces the time that you have to wait to a minute, and is checking every time the void is run, which can be quite a lot, especially when you have a lot of people online.

    In short, I don't see how your way can possibly be better, because it causes more lag, and waste of system resources that may or may not be noticeable to you. Therefore, I challenge you to explain how your code is superior.
    It will cause more lagg if you have a slow pc or a cheap dedi, Also
    you fail just leave seriously, theres nothing you can do here.
     

  8. #8  
    lol3
    Guest
    Lmfao, it doesn't matter how good the server is, lag is potentially created period, why make more potential lag than is needed? The more code run the more system resources it uses, if you were to ever manage get 1k people or so you're going to be scrounging to reduce as much lag as possible, and make the code minimal, and this is done by not having all that extra code, that is run when it's not needed.

    If you knew anything you would see how big of a fail you are. You're the moron that makes at least 8 help topics asking for help, then acts all "leet", and tell people they fail, when you don't have a clue as to what is going on.
     

  9. #9  
    anc13nts
    Guest
    Quote Originally Posted by lol3 View Post
    Lmfao, it doesn't matter how good the server is, lag is potentially created period, why make more potential lag than is needed? The more code run the more system resources it uses, if you were to ever manage get 1k people or so you're going to be scrounging to reduce as much lag as possible, and make the code minimal, and this is done by not having all that extra code, that is run when it's not needed.

    If you knew anything you would see how big of a fail you are. You're the moron that makes at least 8 help topics asking for help, then acts all "leet", and tell people they fail, when you don't have a clue as to what is going on.
    I don`t have a clue?
    Show me pictures\project of your server and then ill determine if your a good coder or not, If you are then Ill give you respect but as far as I can see you don't seem to good. But aye, me I can really care less what you think because I know if i`m a good coder or not. And I bet those so called 8 topics no one helped me on mostly or they just said some wrong code\tip. So good try there but you don't win you lose.
    Also, Where you said I couldn't code and say I didn't know how to compress xml files to xml.gz by making levers teleport. You can also go to the Actionobjectevent.java and code the lever in there.
     

  10. #10  
    Registered Member
    Join Date
    Aug 2008
    Posts
    24
    Thanks given
    0
    Thanks received
    0
    Rep Power
    19
    hey lol3... haha your an idiot. im not going to lie. Anc13ntz is a 100X better coder than you.

    I bet you couldnt even code... RS2E

    Heh Sad.
     

Page 1 of 3 123 LastLast

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
  •