Exemplo n.º 1
0
 protected void onPrivateMessage(String sender, String login, String hostname, String message) {
   if (!sender.equals("jtv")) {
     StatusUpdate.contactMe(sender + ": " + message);
     this.sendMessage(
         sender, "Your message has been forwarded to the operator of this bot. Please hold.");
   }
 }
Exemplo n.º 2
0
 public void onMessage(
     String channel, String sender, String login, String hostname, String message) {
   @SuppressWarnings("unused")
   String str = message;
   if (message.indexOf("!tweet ") != -1) {
     String status = message.replaceFirst("!tweet ", "");
     String finalStatus = StatusUpdate.update(status);
     if (finalStatus != "") {
       sendMessage(channel, "Status: " + finalStatus);
     } else {
       sendMessage(channel, "Woops! Something went wrong.");
     }
   }
 }