X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetSoneCommand.java;h=64d24febd037f2142ee996ade9849c44895e5542;hb=64740709990291688170ebd1f192af5eb9090618;hp=2ad514fcdaec885c312f66a55abc87e746095d87;hpb=76ed638264e531a26e35647d13702db865a52321;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 2ad514f..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â2015 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,6 +17,8 @@
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;
@@ -25,13 +27,10 @@ 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 {
@@ -49,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);
- Optional 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));
}
}