From b1d5d5801e90ef0d4e282a78543f1435b8b7d223 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 7 May 2016 19:57:10 +0300 Subject: STARTTLS --- src/main/java/com/juick/xmpp/s2s/JuickBot.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java/com/juick/xmpp/s2s/JuickBot.java') diff --git a/src/main/java/com/juick/xmpp/s2s/JuickBot.java b/src/main/java/com/juick/xmpp/s2s/JuickBot.java index 182de10d..0b9cceaf 100644 --- a/src/main/java/com/juick/xmpp/s2s/JuickBot.java +++ b/src/main/java/com/juick/xmpp/s2s/JuickBot.java @@ -55,7 +55,7 @@ public class JuickBot { + "\n" + "Read more: http://juick.com/help/"; - public static boolean incomingPresence(Presence p) { + public static boolean incomingPresence(Presence p) throws Exception { final String username = p.to.Username.toLowerCase(); final boolean toJuick = username.equals("juick"); @@ -137,7 +137,7 @@ public class JuickBot { return false; } - public static boolean incomingMessage(Message msg) { + public static boolean incomingMessage(Message msg) throws Exception { if (msg.body == null || msg.body.isEmpty()) { return true; } @@ -237,7 +237,7 @@ public class JuickBot { } private static Pattern regexPM = Pattern.compile("^\\@(\\S+)\\s+([\\s\\S]+)$"); - public static boolean incomingMessageJuick(User user_from, Message msg) { + public static boolean incomingMessageJuick(User user_from, Message msg) throws Exception { String command = msg.body.trim(); int commandlen = command.length(); @@ -274,7 +274,7 @@ public class JuickBot { return false; } - private static void commandPing(Message m) { + private static void commandPing(Message m) throws Exception { Presence p = new Presence(JuickJID, m.from); p.priority = 10; XMPPComponent.sendOut(p); @@ -284,19 +284,19 @@ public class JuickBot { XMPPComponent.sendOut(reply); } - private static void commandHelp(Message m) { + private static void commandHelp(Message m) throws Exception { Message reply = new Message(JuickJID, m.from, Message.Type.chat); reply.body = HELPTEXT; XMPPComponent.sendOut(reply); } - private static void commandLogin(Message m, User user_from) { + private static void commandLogin(Message m, User user_from) throws Exception { Message reply = new Message(JuickJID, m.from, Message.Type.chat); reply.body = "http://juick.com/login?" + UserQueries.getHashByUID(XMPPComponent.sql, user_from.getUID()); XMPPComponent.sendOut(reply); } - private static void commandPM(Message m, User user_from, String user_to, String body) { + private static void commandPM(Message m, User user_from, String user_to, String body) throws Exception { int ret = 0; int uid_to = 0; @@ -368,7 +368,7 @@ public class JuickBot { XMPPComponent.sendOut(reply); } - private static void commandBLShow(Message m, User user_from) { + private static void commandBLShow(Message m, User user_from) throws Exception { List blusers; List bltags; -- cgit v1.2.3