mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Added HTML decode to fix issues with users who have apostrophes in their username
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Text.Json;
|
||||
using System.Net;
|
||||
using System.Text.Json;
|
||||
using KfChatDotNetKickBot.Models;
|
||||
using KfChatDotNetKickBot.Services;
|
||||
using KfChatDotNetWsClient;
|
||||
@@ -253,7 +254,8 @@ public class KickBot
|
||||
}
|
||||
else if (message.MessageRaw.StartsWith("!whois"))
|
||||
{
|
||||
var lookup = message.MessageRaw.Replace("!whois ", string.Empty).TrimStart('@').TrimEnd(' ').TrimEnd(',');
|
||||
var lookup = WebUtility.HtmlDecode(message.MessageRaw.Replace("!whois ", string.Empty)
|
||||
.TrimStart('@').TrimEnd(' ').TrimEnd(','));
|
||||
if (_userIdMapping.ContainsKey(lookup))
|
||||
{
|
||||
_sendChatMessage($"{lookup}'s ID is {_userIdMapping[lookup]}", true);
|
||||
|
||||
Reference in New Issue
Block a user