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.

ServerConfig.cs 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Net;
  6. using System.Threading.Tasks;
  7. using Combot.Modules;
  8. namespace Combot.Configurations
  9. {
  10. public class ServerConfig
  11. {
  12. public event Action ModifyEvent;
  13. public string Name { get; set; }
  14. public List<string> Nicknames { get; set; }
  15. public string Realname { get; set; }
  16. public string Username { get; set; }
  17. public string Password { get; set; }
  18. public string Email { get; set; }
  19. public List<string> Owners { get; set; }
  20. public List<string> ChannelBlacklist { get; set; }
  21. public List<string> NickBlacklist { get; set; }
  22. public List<HostConfig> Hosts { get; set; }
  23. public List<ChannelConfig> Channels { get; set; }
  24. public string ModuleLocation { get; set; }
  25. public bool AutoConnect { get; set; }
  26. public bool AutoRegister { get; set; }
  27. public string CommandPrefix { get; set; }
  28. public int JoinDelay { get; set; }
  29. public int MaxMessageLength { get; set; }
  30. public int MessageSendDelay { get; set; }
  31. public ServerConfig()
  32. {
  33. SetDefaults();
  34. }
  35. public void SetDefaults()
  36. {
  37. Name = string.Empty;
  38. Nicknames = new List<string>();
  39. Realname = string.Empty;
  40. Username = string.Empty;
  41. Password = string.Empty;
  42. Email = string.Empty;
  43. AutoConnect = false;
  44. AutoRegister = false;
  45. CommandPrefix = string.Empty;
  46. JoinDelay = 0;
  47. MaxMessageLength = 400;
  48. MessageSendDelay = 0;
  49. ModuleLocation = string.Empty;
  50. Owners = new List<string>();
  51. ChannelBlacklist = new List<string>();
  52. NickBlacklist = new List<string>();
  53. Channels = new List<ChannelConfig>();
  54. Hosts = new List<HostConfig>();
  55. }
  56. public void Save()
  57. {
  58. if (ModifyEvent != null)
  59. {
  60. ModifyEvent();
  61. }
  62. }
  63. }
  64. }