Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1.             if ( message.startsWith("~") ){
  2.                 String word = (message.substring(1)).trim(); // remove ~
  3.                 if (message.indexOf(" ") > -1){
  4.                     sendMessage(channel, word);
  5.                     for (String msg: word.split(" "))
  6.                         sendMessage(channel, msg);
  7.                     String person = word.split(" ")[0];
  8.                     word = word.split(" ")[1];
  9.                     if ( factoids.containsKey(word))
  10.                         sendMessage(channel, person + ": " + factoids.get(word));
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement