The easy to use and full featured Irc Bot everyone is talking about!
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Fun.cs 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. string nickname = command.Arguments.ContainsKey("Nickname") ? command.Arguments["Nickname"] : command.Nick.Nickname;
  15. switch (foundCommand.Name)
  16. {
  17. case "Love":
  18. Random random = new Random();
  19. int randNum = random.Next(0, 4);
  20. switch (randNum)
  21. {
  22. case 0:
  23. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("gently makes love to {0}", nickname));
  24. break;
  25. case 1:
  26. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("sings a love ballad to {0}", nickname));
  27. break;
  28. case 2:
  29. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("slowly sneaks up behind {0}", nickname));
  30. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("squeezes {0} tightly", nickname));
  31. break;
  32. case 3:
  33. Bot.IRC.Command.SendPrivateMessage(channel, string.Format("I love you {0}! Sooo much!", nickname));
  34. break;
  35. }
  36. break;
  37. case "Hug":
  38. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("hugs {0}", nickname));
  39. break;
  40. case "Slap":
  41. Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("slaps {0} with a large trout", nickname));
  42. break;
  43. case "Brazilian Laugh":
  44. SendResponse(command.MessageType, command.Location, command.Nick.Nickname, "HUEHUEHUE");
  45. break;
  46. case ".NET":
  47. SendResponse(command.MessageType, command.Location, command.Nick.Nickname, "Sure is enterprise quality in here.");
  48. break;
  49. case "Bot Response":
  50. SendResponse(command.MessageType, command.Location, command.Nick.Nickname, GetOptionValue("Response").ToString());
  51. break;
  52. }
  53. }
  54. }
  55. }