X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetLocalSonesCommand.java;h=3d0bf28d22fe67d74d91017c708dbf85ce260d95;hp=5d44befc9095259dae2ec6902bc25b7971d9b3d9;hb=62573c314957b1851f4fbe693b8746686caa940a;hpb=2581481ff5a60ea2b00fd69df276a3f3a1f4ef21 diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetLocalSonesCommand.java index 5d44bef..3d0bf28 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 @@ -18,15 +18,11 @@ package net.pterodactylus.sone.fcp; 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 +40,8 @@ public class GetLocalSonesCommand extends AbstractSoneCommand { * {@inheritDoc} */ @Override - public Reply execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { - return new Reply(encodeSones(getCore().getLocalSones())); + public Response execute(SimpleFieldSet parameters) { + return new Response("ListLocalSones", encodeSones(getCore().getLocalSones(), "LocalSones.")); } }