Advertisement
Guest User

Untitled

a guest
May 24th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. public void onMessage(String channel, String sender, String login, String hostname, String message) {
  2.  
  3. String messageIC = message.trim( ).toLowerCase( );
  4.  
  5. if (message.equalsIgnoreCase("time")) {
  6. String time = new java.util.Date().toString();
  7. sendMessage(channel, sender + ": The time is now " + time);
  8. }
  9. if (messageIC.contains("Ampersand")) {
  10. double randomosity = Math.random();
  11. if (randomosity < 0.4) {
  12. sendMessage(channel, "Hello.");
  13. }
  14. else if (randomosity > 0.7) {
  15. sendMessage(channel, "Sup?");
  16. }
  17. else {
  18. sendMessage(channel, "I am Ampersand, a bot created out of boredom and lack of witty replies.");
  19. }
  20. }
  21. if (messageIC.contains("Poad")) {
  22. double randomosity = Math.random();
  23. if (randomosity < 0.2) {
  24. sendMessage(channel, "Poad is my brother.");
  25. }
  26. else if (randomosity > 0.9) {
  27. sendMessage(channel, "!slay Poad");
  28. }
  29. else if (randomosity >.2 && randomosity <.5) {
  30. sendMessage(channel, "Poad, I love you.");
  31. }
  32. else if (randomosity >.5 && randomosity <.9) {
  33. sendMessage(channel, "No love for Ampersand?")
  34. }
  35. }
  36. if (messageIC.contains("I want it")) {
  37. sendMessage(channel, "I want it that way.")
  38. }
  39. }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement