From: David ‘Bombe’ Roden Date: Wed, 27 Oct 2010 15:49:41 +0000 (+0200) Subject: Store insert key of blacklisted local Sones. X-Git-Tag: 0.1-RC1~16 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=897f2c637fc197ae67903671c200e590084dd460;p=Sone.git Store insert key of blacklisted local Sones. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 941710c..6a2d8a3 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -874,8 +874,9 @@ public class Core extends AbstractService { } String blacklistedSoneName = configuration.getStringValue(blacklistedSonePrefix + "/Name").getValue(null); String blacklistedSoneKey = configuration.getStringValue(blacklistedSonePrefix + "/Key").getValue(null); + String blacklistedSoneInsertKey = configuration.getStringValue(blacklistedSonePrefix + "/InsertKey").getValue(null); try { - blacklistSone(getSone(blacklistedSoneId).setName(blacklistedSoneName).setRequestUri(new FreenetURI(blacklistedSoneKey))); + blacklistSone(getSone(blacklistedSoneId).setName(blacklistedSoneName).setRequestUri(new FreenetURI(blacklistedSoneKey)).setInsertUri((blacklistedSoneInsertKey != null) ? new FreenetURI(blacklistedSoneInsertKey) : null)); } catch (MalformedURLException mue1) { logger.log(Level.WARNING, "Could not create blacklisted Sone from requestUri (“" + blacklistedSoneKey + "”)!", mue1); } @@ -996,6 +997,7 @@ public class Core extends AbstractService { configuration.getStringValue(blacklistedSonePrefix + "/ID").setValue(blacklistedSone.getId()); configuration.getStringValue(blacklistedSonePrefix + "/Name").setValue(blacklistedSone.getName()); configuration.getStringValue(blacklistedSonePrefix + "/Key").setValue(blacklistedSone.getRequestUri().toString()); + configuration.getStringValue(blacklistedSonePrefix + "/InsertKey").setValue(blacklistedSone.getInsertUri().toString()); /* TODO - store all known stuff? */ } configuration.getStringValue("BlacklistedSone." + blacklistedSonesCounter + "/ID").setValue(null);