Thread: 718 get hostname

Results 1 to 10 of 10
  1. #1 718 get hostname 
    Registered Member
    Join Date
    Apr 2012
    Posts
    853
    Thanks given
    94
    Thanks received
    33
    Rep Power
    0
    how to make it get the hostname ? getHostName() dont work
    Reply With Quote  
     

  2. #2  
    Registered Member Ffsn99b's Avatar
    Join Date
    Aug 2013
    Posts
    137
    Thanks given
    3
    Thanks received
    9
    Rep Power
    16
    Then make the method so it does work...
    Quote Originally Posted by Sam Bartlett View Post
    Why would you want to remove the music tab? Idiot..
    I'm an idiot for removing something I don't plan to use? The irony.
    Quote Originally Posted by Sam Bartlett View Post
    I'm pround to be in your signature, you're an apsalute idiot and act clever. Then you make a fool of yourself.
    proud*
    absolute*
    This is going to go in my sig as well lol, gj
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Dec 2012
    Posts
    558
    Thanks given
    24
    Thanks received
    115
    Rep Power
    0
    wat do you want
    Reply With Quote  
     

  4. #4  
    I heal clients


    Join Date
    Apr 2013
    Posts
    680
    Thanks given
    65
    Thanks received
    239
    Rep Power
    108
    here is methods from original matrix
    Code:
    	public String getLastIP() {
    		return lastIP;
    	}
    
    	public String getLastHostname() {
    		InetAddress addr;
    		try {
    			addr = InetAddress.getByName(getLastIP());
    			String hostname = addr.getHostName();
    			return hostname;
    		} catch (UnknownHostException e) {
    			e.printStackTrace();
    		}
    		return null;
    	}
    NO ONE IS PERFECT
    "No one in this world is pure and perfect, if you avoid people for their little mistakes you will be always alone in this world, so judge less and love more."
    "Ship in the harbor is safe, but that is not what ships are built for."
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Registered Member
    Join Date
    Apr 2012
    Posts
    853
    Thanks given
    94
    Thanks received
    33
    Rep Power
    0
    Quote Originally Posted by walied yassen View Post
    here is methods from original matrix
    Code:
    	public String getLastIP() {
    		return lastIP;
    	}
    
    	public String getLastHostname() {
    		InetAddress addr;
    		try {
    			addr = InetAddress.getByName(getLastIP());
    			String hostname = addr.getHostName();
    			return hostname;
    		} catch (UnknownHostException e) {
    			e.printStackTrace();
    		}
    		return null;
    	}
    thx i did

    if (player.getLastHostname().contains("host name here")) {
    //TODO
    return;
    }
    but it dont work?
    Reply With Quote  
     

  7. #6  
    Registered Member
    Join Date
    Apr 2012
    Posts
    853
    Thanks given
    94
    Thanks received
    33
    Rep Power
    0
    plz any know y it no work? i want it check if host name contains given word then it block from login but it dont check
    Reply With Quote  
     

  8. #7  
    48 0x69

    Pax M's Avatar
    Join Date
    Oct 2013
    Posts
    2,008
    Thanks given
    36
    Thanks received
    488
    Rep Power
    2270
    Quote Originally Posted by helpMe View Post
    plz any know y it no work? i want it check if host name contains given word then it block from login but it dont check
    Nice name tho.
    Reply With Quote  
     

  9. #8  
    Extreme Donator


    Join Date
    Sep 2011
    Posts
    1,034
    Thanks given
    133
    Thanks received
    257
    Rep Power
    76
    Quote Originally Posted by Luke132 View Post
    Nice name tho.
    thats rich
    Reply With Quote  
     

  10. #9  
    Banned
    Join Date
    Jun 2013
    Posts
    362
    Thanks given
    112
    Thanks received
    31
    Rep Power
    0
    Mate.. Use your common sense. Is it that hard?

    if (player.getLastHostname().contains("host name here")) {
    //TODO
    return;
    }

    What do you think //TODO means? It means to make the method. Not to use eclipse do the easy fix of creating a new method and leaving it like that. That's the outcome you get.
    Reply With Quote  
     

  11. #10  
    Registered Member
    Join Date
    Apr 2012
    Posts
    853
    Thanks given
    94
    Thanks received
    33
    Rep Power
    0
    Quote Originally Posted by askid12 View Post
    Mate.. Use your common sense. Is it that hard?

    if (player.getLastHostname().contains("host name here")) {
    //TODO
    return;
    }
    What do you think //TODO means? It means to make the method. Not to use eclipse do the easy fix of creating a new method and leaving it like that. That's the outcome you get.

    what u say? i already got that if u read and i put things for it TODO also but it dont do it. it is like it dont check host name at all
    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. [718] Getting your server started!
    By Kaleem in forum Tutorials
    Replies: 138
    Last Post: 12-06-2018, 05:01 PM
  2. Replies: 12
    Last Post: 07-18-2014, 01:28 AM
  3. Replies: 14
    Last Post: 09-19-2013, 01:08 AM
  4. Replies: 19
    Last Post: 08-14-2013, 10:12 AM
  5. [718] "Get Task" Option for Kuradal?
    By Proverbs in forum Help
    Replies: 3
    Last Post: 08-13-2013, 04:58 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •