From 89ba7e24f9303ba878ecc44188de3f9f8ad1f65e Mon Sep 17 00:00:00 2001 From: Alexandre Oliveira Date: Mon, 5 Mar 2018 23:27:26 -0300 Subject: [PATCH] Check ISUPPORT against null and string.Empty - Some IRC networks may specify ISUPPORT tokens without values, which the parser considers as being null, resulting in a crash. --- ChatSharp/Handlers/ServerHandlers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChatSharp/Handlers/ServerHandlers.cs b/ChatSharp/Handlers/ServerHandlers.cs index 4e44643..0a600bf 100644 --- a/ChatSharp/Handlers/ServerHandlers.cs +++ b/ChatSharp/Handlers/ServerHandlers.cs @@ -24,7 +24,7 @@ namespace ChatSharp.Handlers } // TODO: Consider doing this differently // TODO: Allow users to specify other things to handle - if (value != null) + if (!string.IsNullOrEmpty(value)) { switch (key.ToUpper()) {