All pastes #443491 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-16 20:46 UTC
rendered paste body
	HashMap whoisRef = new HashMap();

	public String getUserHost(final String userName) {
		whoisRef.put(userName.toLowerCase(), null);
		sendRawLine("WHOIS "+ userName);
	}
	
	public void onServerResponse(int code, String response) {
		if(code == RPL_WHOISUSER) {
			String parts[] = response.split(" ");
			String userName = parts[1].toLowerCase();
			if(whoisRef.containsKey(userName)) {  // nick
				whoisRef.remove(userName);
                                doMyDBStuff(username, parts[3]);
			}
		}
	}