mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
THe battle of the retards continues. Total U+200B Death
This commit is contained in:
@@ -313,12 +313,15 @@ public class ChatBot
|
|||||||
_seenMessages.Add(new SeenMessageMetadataModel {MessageId = message.MessageId, LastEdited = message.MessageEditDate});
|
_seenMessages.Add(new SeenMessageMetadataModel {MessageId = message.MessageId, LastEdited = message.MessageEditDate});
|
||||||
}
|
}
|
||||||
UpdateUserLastActivityAsync(message.Author.Id, WhoWasActivityType.Message).Wait(_cancellationToken);
|
UpdateUserLastActivityAsync(message.Author.Id, WhoWasActivityType.Message).Wait(_cancellationToken);
|
||||||
|
// Strip weird control characters and just allow basic punctuation + whitespace
|
||||||
|
var kindaSanitized = new string(message.MessageRawHtmlDecoded
|
||||||
|
.Where(c => c == ' ' || char.IsPunctuation(c) || char.IsLetter(c) || char.IsDigit(c)).ToArray());
|
||||||
if (message.MessageEditDate == null && message.Author.Id != settings[BuiltIn.Keys.GambaSeshUserId].ToType<int>() &&
|
if (message.MessageEditDate == null && message.Author.Id != settings[BuiltIn.Keys.GambaSeshUserId].ToType<int>() &&
|
||||||
message.Author.Username != settings[BuiltIn.Keys.KiwiFarmsUsername].Value &&
|
message.Author.Username != settings[BuiltIn.Keys.KiwiFarmsUsername].Value &&
|
||||||
settings[BuiltIn.Keys.BotRespondToDiscordImpersonation].ToBoolean() &&
|
settings[BuiltIn.Keys.BotRespondToDiscordImpersonation].ToBoolean() &&
|
||||||
(message.MessageRawHtmlDecoded.Contains("discord16.png") ||
|
(kindaSanitized.Contains("discord16.png") ||
|
||||||
message.MessageRawHtmlDecoded.Contains("mBossmanJack:", StringComparison.CurrentCultureIgnoreCase) ||
|
kindaSanitized.Contains("mBossmanJack:", StringComparison.CurrentCultureIgnoreCase) ||
|
||||||
message.MessageRawHtmlDecoded.Contains("by @KenoGPT at", StringComparison.CurrentCultureIgnoreCase)))
|
kindaSanitized.Contains("by @KenoGPT at", StringComparison.CurrentCultureIgnoreCase)))
|
||||||
{
|
{
|
||||||
SendChatMessage($"☝️ {message.Author.Username} is a nigger faggot", true);
|
SendChatMessage($"☝️ {message.Author.Username} is a nigger faggot", true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user