aboutsummaryrefslogtreecommitdiff
path: root/juick-commands/src/main/java/com/juick/command/Processor.java
diff options
context:
space:
mode:
authorGravatar Anatoliy Sablin2017-11-06 16:54:00 +0300
committerGravatar Anatoliy Sablin2017-11-06 16:54:00 +0300
commitbb2a47ea3c17f92c1d55d8b0d26cd26a880373d9 (patch)
tree29a8b9773671357948a1841c4a8663dd83b87e2d /juick-commands/src/main/java/com/juick/command/Processor.java
parent7fe4c65820d012d684405c56942b01da8e77bd23 (diff)
Moved to message listener.
Diffstat (limited to 'juick-commands/src/main/java/com/juick/command/Processor.java')
-rw-r--r--juick-commands/src/main/java/com/juick/command/Processor.java9
1 files changed, 4 insertions, 5 deletions
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<Command> commands;
@Setter
- private ProtocolListener protocolListener;
+ private MessageListener messageListener;
@Autowired
public Processor(Set<Command> 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";
}
}