diff options
Diffstat (limited to 'IrcStates/ISupport.cs')
-rw-r--r-- | IrcStates/ISupport.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/IrcStates/ISupport.cs b/IrcStates/ISupport.cs index b9ad502..afb633d 100644 --- a/IrcStates/ISupport.cs +++ b/IrcStates/ISupport.cs @@ -31,8 +31,10 @@ namespace IrcStates public int? Watch { get; set; } public bool Whox { get; set; } - public void Parse(IList<string> tokens) + public void Parse(IEnumerable<string> tokens) { + if (tokens == null) return; + foreach (var token in tokens) { var split = token.Split('=', 2); @@ -65,7 +67,8 @@ namespace IrcStates Watch = int.Parse(value, NumberStyles.Integer, CultureInfo.InvariantCulture); break; case "CASEMAPPING": - if (Enum.TryParse(value, true, out Casemap.CaseMapping caseMapping)) CaseMapping = caseMapping; + if (Enum.TryParse(value, true, out Casemap.CaseMapping caseMapping)) + CaseMapping = caseMapping; break; case "CHANTYPES": ChanTypes = new List<string> {value}; |