From c56aa2e1e475fa482dbfa6d44e927fbb12459a8c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 25 Feb 2018 09:46:09 +0300 Subject: xmpp: add some disabled commands --- juick-server/src/main/java/com/juick/server/XMPPBot.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'juick-server/src/main/java/com') diff --git a/juick-server/src/main/java/com/juick/server/XMPPBot.java b/juick-server/src/main/java/com/juick/server/XMPPBot.java index 6215576a..38f3ed45 100644 --- a/juick-server/src/main/java/com/juick/server/XMPPBot.java +++ b/juick-server/src/main/java/com/juick/server/XMPPBot.java @@ -670,12 +670,19 @@ public class XMPPBot implements StanzaListener, AutoCloseable { return "This is not your reply"; } } - /* - @UserCommand(pattern = "(^(D L|DL|D LAST)$", help = "D #1234/5 - Delete comment", patternFlags = Pattern.CASE_INSENSITIVE) + @UserCommand(pattern = "(^(D L|DL|D LAST)$", help = "D L - Delete last message", patternFlags = Pattern.CASE_INSENSITIVE) public String commandDeleteLast(User user, Jid from, String... args) { - + return "Temporarily unavailable"; + } + @UserCommand(pattern = "^\\?\\s+\\@([a-zA-Z0-9\\-\\.\\@]+)\\s+([\\s\\S]+)$", help = "? @user string - search in user messages") + public String commandSearch(User user, Jid from, String... args) { + return "Temporarily unavailable"; } - */ + @UserCommand(pattern = "^\\?\\s+([\\s\\S]+)$", help = "? string - search in all messages") + public String commandSearchAll(User user, Jid from, String... args) { + return "Temporarily unavailable"; + } + void sendReply(Jid jidTo, String txt) { Message reply = new Message(); reply.setFrom(jid); -- cgit v1.2.3