X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetLocalSonesCommand.java;h=c726ea3b530e073c33bb0f28c162b4b88d6044eb;hp=1054f761a3a7feffaed091a52104bb800e26f479;hb=5ab6ee01df9bac0c7bd5d27a6990dfdf60555d0f;hpb=6a426e5c3a82f3e63a8763d2a5ad57f311bc6065 diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java index 1054f76..c726ea3 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java @@ -1,5 +1,5 @@ /* - * Sone - GetLocalSonesCommand.java - Copyright © 2011 David Roden + * Sone - GetLocalSonesCommand.java - Copyright © 2011–2016 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,16 +17,14 @@ package net.pterodactylus.sone.fcp; +import static net.pterodactylus.sone.fcp.AbstractSoneCommandKt.encodeSones; + import net.pterodactylus.sone.core.Core; -import net.pterodactylus.sone.freenet.fcp.FcpException; import freenet.support.SimpleFieldSet; -import freenet.support.api.Bucket; /** * Implements the “GetLocalSones” FCP command that returns the list of local * Sones to the sender. - * - * @author David ‘Bombe’ Roden */ public class GetLocalSonesCommand extends AbstractSoneCommand { @@ -44,8 +42,8 @@ public class GetLocalSonesCommand extends AbstractSoneCommand { * {@inheritDoc} */ @Override - public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { - return new Response(encodeSones(getCore().getLocalSones())); + public Response execute(SimpleFieldSet parameters) { + return new Response("ListLocalSones", encodeSones(getCore().getLocalSones(), "LocalSones.")); } }