return;
}
if(!(pn instanceof DarknetPeerNode)) {
throw new MessageInvalidException(ProtocolErrorMessage.DARKNET_ONLY, "ModifyPeer only available for darknet peers", identifier, false);
}
DarknetPeerNode dpn = (DarknetPeerNode) pn;
String isDisabledString = fs.get("IsDisabled");
if(isDisabledString != null) {
if(!isDisabledString.equals("")) {
if(Fields.stringToBool(isDisabledString, false)) {
dpn.disablePeer();
} else {
dpn.enablePeer();
}
}
}
String isListenOnlyString = fs.get("IsListenOnly");
if(isListenOnlyString != null) {
if(!isListenOnlyString.equals("")) {
dpn.setListenOnly(Fields.stringToBool(isListenOnlyString, false));
}
}
String isBurstOnlyString = fs.get("IsBurstOnly");
if(isBurstOnlyString != null) {
if(!isBurstOnlyString.equals("")) {
dpn.setBurstOnly(Fields.stringToBool(isBurstOnlyString, false));
}
}
String ignoreSourcePortString = fs.get("IgnoreSourcePort");
if(ignoreSourcePortString != null) {
if(!ignoreSourcePortString.equals("")) {
dpn.setIgnoreSourcePort(Fields.stringToBool(ignoreSourcePortString, false));
}
}
String allowLocalAddressesString = fs.get("AllowLocalAddresses");
if(allowLocalAddressesString != null) {
if(!allowLocalAddressesString.equals("")) {
dpn.setAllowLocalAddresses(Fields.stringToBool(allowLocalAddressesString, false));
}
}
handler.outputHandler.queue(new PeerMessage(pn, true, true, identifier));
}