aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/xmpp/s2s/JuickBot.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/xmpp/s2s/JuickBot.java')
-rw-r--r--src/main/java/com/juick/xmpp/s2s/JuickBot.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/com/juick/xmpp/s2s/JuickBot.java b/src/main/java/com/juick/xmpp/s2s/JuickBot.java
index 18e7580d..f0b71689 100644
--- a/src/main/java/com/juick/xmpp/s2s/JuickBot.java
+++ b/src/main/java/com/juick/xmpp/s2s/JuickBot.java
@@ -20,11 +20,12 @@ import java.util.regex.Pattern;
*/
public class JuickBot {
XMPPComponent xmpp;
- public JuickBot(XMPPComponent xmpp) {
+ public JuickBot(XMPPComponent xmpp, JID JuickJID) {
this.xmpp = xmpp;
+ this.JuickJID = JuickJID;
}
- public static final JID JuickJID = new JID("juick", "juick.com", "Juick");
+ public final JID JuickJID;
private static final String HELPTEXT =
"@username text - Send private message\n"
+ "*tagname Blah-blah-blah - Post a message with tag 'tagname'\n"
@@ -187,10 +188,10 @@ public class JuickBot {
jmsg.setUser(user_from);
jmsg.setText(msg.body);
m.childs.add(jmsg);
- xmpp.connRouter.router.send(m.toString());
+ xmpp.router.send(m.toString());
m.to.Host = "ws.juick.com";
- xmpp.connRouter.router.send(m.toString());
+ xmpp.router.send(m.toString());
List<String> jids;
boolean inroster = false;
@@ -315,10 +316,10 @@ public class JuickBot {
jmsg.setUser(user_from);
jmsg.setText(body);
msg.childs.add(jmsg);
- xmpp.connRouter.router.send(msg.toString());
+ xmpp.router.send(msg.toString());
msg.to.Host = "ws.juick.com";
- xmpp.connRouter.router.send(msg.toString());
+ xmpp.router.send(msg.toString());
for (String jid : jids_to) {
Message mm = new Message();