X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetSoneCommand.java;h=a4b936bcfddfa76d6adc24c6d4eefb94515c314b;hb=41ca6590c4a7372cb4f687f6e3cfdc2fab232703;hp=c71ea43601dcca8ec62cf6932370dec96169a437;hpb=50ce65f69e49ed10abeedaeb6615ffb37a0c0772;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetSoneCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetSoneCommand.java
index c71ea43..a4b936b 100644
--- a/src/main/java/net/pterodactylus/sone/fcp/GetSoneCommand.java
+++ b/src/main/java/net/pterodactylus/sone/fcp/GetSoneCommand.java
@@ -1,5 +1,5 @@
/*
- * Sone - GetSoneCommand.java - Copyright © 2011â2012 David Roden
+ * Sone - GetSoneCommand.java - Copyright © 2011â2019 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,18 +17,20 @@
package net.pterodactylus.sone.fcp;
+import static net.pterodactylus.sone.fcp.AbstractSoneCommandKt.encodeSone;
+
import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.data.Profile;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.freenet.fcp.FcpException;
+
+import com.google.common.base.Optional;
+
import freenet.support.SimpleFieldSet;
-import freenet.support.api.Bucket;
/**
* Implements the âGetSoneâ FCP command which returns {@link Profile}
* information about a {@link Sone}.
- *
- * @author David âBombeâ Roden
*/
public class GetSoneCommand extends AbstractSoneCommand {
@@ -46,10 +48,10 @@ public class GetSoneCommand extends AbstractSoneCommand {
* {@inheritDoc}
*/
@Override
- public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
+ public Response execute(SimpleFieldSet parameters) throws FcpException {
Sone sone = getSone(parameters, "Sone", false);
- Sone localSone = getSone(parameters, "LocalSone", false, false);
- return new Response("Sone", encodeSone(sone, "", localSone));
+ Optional localSone = getSone(parameters, "LocalSone", true, false);
+ return new Response("Sone", encodeSone(sone, "Sone.", localSone));
}
}