From bb2a47ea3c17f92c1d55d8b0d26cd26a880373d9 Mon Sep 17 00:00:00 2001 From: Anatoliy Sablin Date: Mon, 6 Nov 2017 16:54:00 +0300 Subject: Moved to message listener. --- juick-commands/src/main/java/com/juick/command/Processor.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'juick-commands/src/main/java/com/juick/command/Processor.java') diff --git a/juick-commands/src/main/java/com/juick/command/Processor.java b/juick-commands/src/main/java/com/juick/command/Processor.java index 60815d16..bf46a758 100644 --- a/juick-commands/src/main/java/com/juick/command/Processor.java +++ b/juick-commands/src/main/java/com/juick/command/Processor.java @@ -1,7 +1,6 @@ package com.juick.command; import com.juick.User; -import com.juick.server.protocol.ProtocolListener; import lombok.Getter; import lombok.Setter; import org.slf4j.Logger; @@ -23,7 +22,7 @@ public class Processor { private final Set commands; @Setter - private ProtocolListener protocolListener; + private MessageListener messageListener; @Autowired public Processor(Set commands) { @@ -46,7 +45,7 @@ public class Processor { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Found command processor: {}", commandItem.getClass().getName()); } - return commandItem.execute(sender, getProtocolListener(), command); + return commandItem.execute(sender, getMessageListener(), command); } else { defaultCommand = commandItem; } @@ -56,9 +55,9 @@ public class Processor { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Found default command processor: {}", defaultCommand.getClass().getName()); } - return defaultCommand.execute(sender, getProtocolListener(), command); + return defaultCommand.execute(sender, getMessageListener(), command); } LOGGER.debug("Command processor not found, return help"); - return helpCommand != null ? helpCommand.execute(sender, getProtocolListener(), command) : "Help not found"; + return helpCommand != null ? helpCommand.execute(sender, getMessageListener(), command) : "Help not found"; } } -- cgit v1.2.3