diff options
Diffstat (limited to 'IRCStates/ISupportChanModes.cs')
-rw-r--r-- | IRCStates/ISupportChanModes.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/IRCStates/ISupportChanModes.cs b/IRCStates/ISupportChanModes.cs new file mode 100644 index 0000000..68cfa67 --- /dev/null +++ b/IRCStates/ISupportChanModes.cs @@ -0,0 +1,33 @@ +using System.Collections.Generic; +using System.Globalization; +using System.Linq; + +namespace IRCStates +{ + public class ISupportChanModes + { + public ISupportChanModes(string splitVal) + { + if (splitVal == null) return; + + var split = splitVal.Split(',', 4); + + ListModes = new List<string>(); + ListModes.AddRange(split[0].Select(c => c.ToString(CultureInfo.InvariantCulture))); + + SettingBModes = new List<string>(); + SettingBModes.AddRange(split[1].Select(c => c.ToString(CultureInfo.InvariantCulture))); + + SettingCModes = new List<string>(); + SettingCModes.AddRange(split[2].Select(c => c.ToString(CultureInfo.InvariantCulture))); + + SettingDModes = new List<string>(); + SettingDModes.AddRange(split[3].Select(c => c.ToString(CultureInfo.InvariantCulture))); + } + + public List<string> ListModes { get; set; } + public List<string> SettingBModes { get; set; } + public List<string> SettingCModes { get; set; } + public List<string> SettingDModes { get; set; } + } +} |