Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( message.startsWith("~") ){
- String word = (message.substring(1)).trim(); // remove ~
- if (message.indexOf(" ") > -1){
- sendMessage(channel, word);
- for (String msg: word.split(" "))
- sendMessage(channel, msg);
- String person = word.split(" ")[0];
- word = word.split(" ")[1];
- if ( factoids.containsKey(word))
- sendMessage(channel, person + ": " + factoids.get(word));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement