X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetLocalSonesCommand.java;h=1427fe7c77c1bc8b21420f099e7925bf05b40b25;hp=718dd8954317f64015ecc9077df3b1d45225e0ec;hb=179e7da4d8d8a474d0b622d60b5f5d32d6ab4052;hpb=96e4cdd1c5a2dc719afbf1f1cc14a3c62e93f432 diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java index 718dd89..1427fe7 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–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,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(), "LocalSones.")); + public Response execute(SimpleFieldSet parameters) { + return new Response("ListLocalSones", encodeSones(getCore().getLocalSones(), "LocalSones.")); } }