String pasword = null;
String email = null;
String address = null;
if (message instanceof MessageC2SCreateAccount) {
MessageC2SCreateAccount msg = (MessageC2SCreateAccount) message;
username = msg.getUsername();
pasword = msg.getPassword();
email = msg.getEmail();
address = msg.getAddress().getHostAddress();
} else {
MessageP2SCreateAccount msg = (MessageP2SCreateAccount) message;
if ((msg.getCredentials() == null) || !(msg.getCredentials().equals(Configuration.getConfiguration().get("proxy_credentials")))) {
logger.warn("Invalid credentials for proxy method.");
return;
}
username = msg.getUsername();
pasword = msg.getPassword();
email = msg.getEmail();
address = msg.getForwardedFor();
}
/*
* We request RP Manager to create an account for our player. This
* will return a <b>result</b> of the operation.