X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FFcpInterface.java;h=b3222bea07da5a2801cece982b374e88cd0cf6df;hp=8959b6a78091be2084c787cef89b0f7e51627a73;hb=5723a2bb28376b0972a63bae2124846116cf6ca5;hpb=2fef2b7dae1fb428e1b060b740b253189dc22bf7 diff --git a/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java b/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java index 8959b6a..b3222be 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java +++ b/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java @@ -1,5 +1,5 @@ /* - * Sone - FcpInterface.java - Copyright © 2011 David Roden + * Sone - FcpInterface.java - Copyright © 2011–2012 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 @@ -84,6 +84,7 @@ public class FcpInterface { commands.put("Version", new VersionCommand(core)); commands.put("GetLocalSones", new GetLocalSonesCommand(core)); commands.put("GetSones", new GetSonesCommand(core)); + commands.put("GetSone", new GetSoneCommand(core)); commands.put("GetPost", new GetPostCommand(core)); commands.put("GetPosts", new GetPostsCommand(core)); commands.put("GetPostFeed", new GetPostFeedCommand(core)); @@ -172,6 +173,7 @@ public class FcpInterface { Response response = command.execute(parameters, data, AccessType.values()[accessType]); sendReply(pluginReplySender, identifier, response); } catch (FcpException fe1) { + logger.log(Level.WARNING, "Could not process FCP command “%s”.", command); sendReply(pluginReplySender, identifier, new ErrorResponse("Error executing command: " + fe1.getMessage())); } } catch (PluginNotFoundException pnfe1) { @@ -195,7 +197,7 @@ public class FcpInterface { * @throws PluginNotFoundException * if the plugin can not be found */ - private void sendReply(PluginReplySender pluginReplySender, String identifier, Response response) throws PluginNotFoundException { + private static void sendReply(PluginReplySender pluginReplySender, String identifier, Response response) throws PluginNotFoundException { SimpleFieldSet replyParameters = response.getReplyParameters(); if (identifier != null) { replyParameters.putOverwrite("Identifier", identifier);