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.

Nick.cs 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Combot
  7. {
  8. public class Nick
  9. {
  10. public string Realname { get; set; }
  11. public string Host { get; set; }
  12. public string Nickname { get; set; }
  13. public string Password { get; set; }
  14. public bool Identified { get; set; }
  15. public bool Registered { get; set; }
  16. public List<UserMode> Modes { get; set; }
  17. public Nick()
  18. {
  19. Realname = string.Empty;
  20. Host = string.Empty;
  21. Nickname = string.Empty;
  22. Password = string.Empty;
  23. Identified = false;
  24. Registered = false;
  25. Modes = new List<UserMode>();
  26. }
  27. public Nick(string realname, string host, string nickname, string password, bool identified, bool registered, List<UserMode> modes)
  28. {
  29. Realname = realname;
  30. Host = host;
  31. Nickname = nickname;
  32. Password = password;
  33. Identified = identified;
  34. Registered = registered;
  35. Modes = modes;
  36. }
  37. public void AddMode(UserMode mode)
  38. {
  39. Modes.Add(mode);
  40. }
  41. public void AddModes(List<UserMode> modes)
  42. {
  43. Modes.AddRange(modes);
  44. }
  45. public void RemoveMode(UserMode mode)
  46. {
  47. if (Modes.Contains(mode))
  48. {
  49. Modes.Remove(mode);
  50. }
  51. }
  52. public void RemoveModes(List<UserMode> modes)
  53. {
  54. foreach (UserMode mode in modes)
  55. {
  56. RemoveMode(mode);
  57. }
  58. }
  59. }
  60. }