From 897f2c637fc197ae67903671c200e590084dd460 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 27 Oct 2010 17:49:41 +0200 Subject: [PATCH] Store insert key of blacklisted local Sones. --- src/main/java/net/pterodactylus/sone/core/Core.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.7.4