about summary refs log tree commit diff
path: root/IrcStates/ISupport.cs
diff options
context:
space:
mode:
Diffstat (limited to 'IrcStates/ISupport.cs')
-rw-r--r--IrcStates/ISupport.cs23
1 files changed, 15 insertions, 8 deletions
diff --git a/IrcStates/ISupport.cs b/IrcStates/ISupport.cs
index 2fc27dc..db2f537 100644
--- a/IrcStates/ISupport.cs
+++ b/IrcStates/ISupport.cs
@@ -16,6 +16,7 @@ namespace IrcStates
             CaseMapping = Casemap.CaseMapping.Rfc1459;
             Prefix      = new ISupportPrefix("(ov)@+");
             ChanModes   = new ISupportChanModes("b,k,l,imnpst");
+            ChanTypes   = new List<string> {"#"};
             StatusMsg   = new List<string>();
             Whox        = false;
         }
@@ -46,10 +47,14 @@ namespace IrcStates
             {
                 var split = token.Split('=', 2);
                 var key   = split[0];
-                var value = split[1];
-
-                if (split.Length > 1) Raw[key] = value;
 
+                var value = string.Empty;
+                if (split.Length > 1)
+                {
+                    value = split[1];
+                    Raw[key] = value;
+                }
+                
                 switch (split[0])
                 {
                     case "NETWORK":
@@ -62,7 +67,8 @@ namespace IrcStates
                         Prefix = new ISupportPrefix(value);
                         break;
                     case "STATUSMSG":
-                        StatusMsg = new List<string> {value};
+                        StatusMsg = new List<string>();
+                        StatusMsg.AddRange(value.Select(c => c.ToString(CultureInfo.InvariantCulture)));
                         break;
                     case "MODES":
                         Modes = int.Parse(value, NumberStyles.Integer, CultureInfo.InvariantCulture);
@@ -77,16 +83,17 @@ namespace IrcStates
                         if (Enum.TryParse(value, true, out Casemap.CaseMapping caseMapping)) CaseMapping = caseMapping;
                         break;
                     case "CHANTYPES":
-                        ChanTypes = new List<string> {value};
+                        ChanTypes = new List<string>();
+                        ChanTypes.AddRange(value.Select(c => c.ToString(CultureInfo.InvariantCulture)));
                         break;
                     case "CALLERID":
-                        CallerId = string.IsNullOrEmpty(value) ? value : "g";
+                        CallerId = string.IsNullOrEmpty(value) ? "g" : value;
                         break;
                     case "EXCEPTS":
-                        Excepts = string.IsNullOrEmpty(value) ? value : "e";
+                        Excepts = string.IsNullOrEmpty(value) ? "e" : value;
                         break;
                     case "INVEX":
-                        Invex = string.IsNullOrEmpty(value) ? value : "I";
+                        Invex = string.IsNullOrEmpty(value) ? "I" : value;
                         break;
                     case "WHOX":
                         Whox = true;