The easy to use and full featured Irc Bot everyone is talking about!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Fun.cs 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. namespace Combot.Modules.Plugins
  3. {
  4. public class Fun : Module
  5. {
  6. public override void Initialize()
  7. {
  8. Bot.CommandReceivedEvent += HandleCommandEvent;
  9. }
  10. public override void ParseCommand(CommandMessage command)
  11. {
  12. Command foundCommand = Commands.Find(c => c.Triggers.Contains(command.Command));
  13. string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
  14. switch (foundCommand.Name)
  15. {
  16. case "Love":
  17. Random random = new Random();
  18. int randNum = random.Next(0, 4);
  19. switch (randNum)
  20. {
  21. case 0:
  22. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("gently makes love to {0}", command.Arguments["Nickname"]));
  23. break;
  24. case 1:
  25. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("sings a love ballad to {0}", command.Arguments["Nickname"]));
  26. break;
  27. case 2:
  28. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("slowly sneaks up behind {0}", command.Arguments["Nickname"]));
  29. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("squeezes {0} tightly", command.Arguments["Nickname"]));
  30. break;
  31. case 3:
  32. Bot.IRC.Command.SendPrivateMessage(channel, string.Format("I love you {0}! Sooo much!", command.Arguments["Nickname"]));
  33. break;
  34. }
  35. break;
  36. case "Hug":
  37. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("hugs {0}", command.Arguments["Nickname"]));
  38. break;
  39. case "Slap":
  40. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("slaps {0} with a large trout", command.Arguments["Nickname"]));
  41. break;
  42. case "Brazilian Laugh":
  43. SendResponse(command.MessageType, command.Location, command.Nick.Nickname, "HUEHUEHUE");
  44. break;
  45. case ".NET":
  46. SendResponse(command.MessageType, command.Location, command.Nick.Nickname, "Sure is enterprise quality in here.");
  47. break;
  48. case "Bot Response":
  49. SendResponse(command.MessageType, command.Location, command.Nick.Nickname, GetOptionValue("Response").ToString());
  50. break;
  51. }
  52. }
  53. }
  54. }