diff options
author | Vitaly Takmazov | 2016-05-07 19:57:10 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-05-07 19:57:10 +0300 |
commit | b1d5d5801e90ef0d4e282a78543f1435b8b7d223 (patch) | |
tree | 70dcd3a4a67c4a15847b3c17357897709f2334ee /src/main/java/com/juick/xmpp/s2s/JuickBot.java | |
parent | f2a2660e753fa11478fd3edadfdff9c000b22cc9 (diff) |
STARTTLS
Diffstat (limited to 'src/main/java/com/juick/xmpp/s2s/JuickBot.java')
-rw-r--r-- | src/main/java/com/juick/xmpp/s2s/JuickBot.java | 16 |
1 files changed, 8 insertions, 8 deletions
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<User> blusers; List<String> bltags; |