X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetSoneCommand.java;h=64d24febd037f2142ee996ade9849c44895e5542;hb=c00c2dea5bbe698a46c443d3610855720baa69a4;hp=5ebdc13bcf79a61f1a88ed538c99f66c811e7d0c;hpb=47ed7eaf00c35889781831d33d04e9f91c9ad266;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 5ebdc13..64d24fe 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 David Roden
+ * Sone - GetSoneCommand.java - Copyright © 2011â2020 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));
}
}