Thread: Quick Question

Results 1 to 7 of 7
  1. #1 Quick Question 
    Registered Member
    Join Date
    Apr 2011
    Posts
    462
    Thanks given
    109
    Thanks received
    38
    Rep Power
    12
    I have a question, nothing too serious.

    What's this used for? Or better yet, what is it? I have seen this multiple times in many revisions, such as 562's, 508's, etc.

    Code:
    	final boolean method2758(int i) {
    		try {
    			String string = ClientScriptMap.anApplet6044.getDocumentBase().getHost().toLowerCase();
    			if (string.equals("jagex.com") || string.endsWith(".jagex.com"))
    				return true;
    			if (string.equals("matrixftw.com") || string.endsWith(".matrixftw.com"))
    				return true;
    			if (string.equals("matrixrsps.com") || string.endsWith(".matrixrsps.com"))
    				return true;
    			if (string.equals("runescape.com") || string.endsWith(".runescape.com"))
    				return true;
    			if (string.equals("stellardawn.com") || string.endsWith(".stellardawn.com"))
    				return true;
    			if (string.endsWith("127.0.0.1") || string.endsWith(Loader.IP))
    				return true;
    			for (; (string.length() > 0 && string.charAt(string.length() - 1) >= '0' && string.charAt(string.length() - 1) <= '9'); string = string.substring(0, string.length() - 1)) {
    			}
    			if (string.endsWith("192.168.1."))
    				return true;
    			method2778("invalidhost", 827144132);
    			return false;
    		} catch (RuntimeException runtimeexception) {
    			throw Class346.method4175(runtimeexception, new StringBuilder().append("mc.g(").append(')').toString());
    		}
    	}
    This piece of code, however is from the 718 build of Matrix. I found it in the client. Class 291 to be exact. So yeah, if you can tell me what this is, explain to me what it does- I'd be forever grateful.
    Reply With Quote  
     

  2. #2  
    Registered Member MooseElkingtons's Avatar
    Join Date
    Aug 2012
    Posts
    33
    Thanks given
    1
    Thanks received
    4
    Rep Power
    7
    I would assume it checks if the client is connecting to a host that ends with (e.g. 127.0.0.1), and if it does, return true; otherwise, return false.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Apr 2011
    Posts
    462
    Thanks given
    109
    Thanks received
    38
    Rep Power
    12
    Quote Originally Posted by MooseElkingtons View Post
    I would assume it checks if the client is connecting to a host that ends with (e.g. 127.0.0.1), and if it does, return true; otherwise, return false.
    Yeah I was thinking something similar along those lines.

    Does anyone else have anything to say about this?
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Apr 2011
    Posts
    462
    Thanks given
    109
    Thanks received
    38
    Rep Power
    12
    Bump.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Mar 2012
    Posts
    180
    Thanks given
    2
    Thanks received
    5
    Rep Power
    18
    First it checks if you are on a client from jagex/runescape.com. This is to ensure your server doesn't get shutdown. If they are on a client run from those sites, the client wont work.

    Then it checks if you are localhost, because if it didn't, localhost wouldn't be able to connect to their own server because of IP problems.

    Rep would be nice
    Omni-Scape Developer
    Reply With Quote  
     

  6. Thankful users:


  7. #6  
    Registered Member
    Join Date
    Apr 2011
    Posts
    462
    Thanks given
    109
    Thanks received
    38
    Rep Power
    12
    Quote Originally Posted by GrumpyThe1st View Post
    First it checks if you are on a client from jagex/runescape.com. This is to ensure your server doesn't get shutdown. If they are on a client run from those sites, the client wont work.

    Then it checks if you are localhost, because if it didn't, localhost wouldn't be able to connect to their own server because of IP problems.

    Rep would be nice
    Ahh thanks for the explanation! Now, does this mean if the client is uploaded to a site to act as a web client, and the site domain not listed in this method, would the web client not run?
    Thanks again! Repped and thanked
    Reply With Quote  
     

  8. #7  
    Registered Member
    Join Date
    Mar 2012
    Posts
    180
    Thanks given
    2
    Thanks received
    5
    Rep Power
    18
    Only if the client was uploaded to one of the sites listed and has a
    return false;
    would it not work.
    Omni-Scape Developer
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. quick question
    By glad 2 own in forum Help
    Replies: 3
    Last Post: 10-25-2011, 01:20 PM
  2. Replies: 3
    Last Post: 09-22-2011, 02:35 AM
  3. Quick question
    By Darkane in forum Help
    Replies: 1
    Last Post: 11-08-2010, 02:25 PM
  4. [PI] Just a quick question on FM
    By Debugger in forum Help
    Replies: 2
    Last Post: 11-06-2010, 04:08 AM
  5. a quick little question
    By Vox' in forum Help
    Replies: 11
    Last Post: 06-12-2009, 10:24 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •