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 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 bool AutoConnect { get; set; }
  15. public string CommandPrefix { get; set; }
  16. public string Nickname { get; set; }
  17. public string Realname { get; set; }
  18. public string Username { 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 List<Module> Modules { get; set; }
  25. public ServerConfig()
  26. {
  27. SetDefaults();
  28. }
  29. public void SetDefaults()
  30. {
  31. Name = string.Empty;
  32. AutoConnect = false;
  33. CommandPrefix = string.Empty;
  34. Owners = new List<string>();
  35. ChannelBlacklist = new List<string>();
  36. NickBlacklist = new List<string>();
  37. Channels = new List<ChannelConfig>();
  38. Modules = new List<Module>();
  39. Hosts = new List<HostConfig>();
  40. Nickname = string.Empty;
  41. Realname = string.Empty;
  42. Username = string.Empty;
  43. }
  44. public void Save()
  45. {
  46. if (ModifyEvent != null)
  47. {
  48. ModifyEvent();
  49. }
  50. }
  51. }
  52. }