From 004c078d54098fffb7a55cd9fbfd7902ebb8d85e Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sun, 23 Jun 2024 13:30:31 +0800 Subject: [PATCH] The bot will now set the GambaSesh presence detection flag if it receives a message in chat from GambaSesh while believing it isn't present. This should hopefully resolve issues where the bot author (since he shares accounts) leaves the channel while the bot is still present which trips the flag. --- KfChatDotNetKickBot/KickBot.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/KfChatDotNetKickBot/KickBot.cs b/KfChatDotNetKickBot/KickBot.cs index d55d35c..27dc984 100644 --- a/KfChatDotNetKickBot/KickBot.cs +++ b/KfChatDotNetKickBot/KickBot.cs @@ -214,6 +214,11 @@ public class KickBot foreach (var message in messages) { _logger.Info($"KF ({message.MessageDate.ToLocalTime():HH:mm:ss}) <{message.Author.Username}> {message.Message}"); + if (_config.EnableGambaSeshDetect && !_initialStartCooldown && message.Author.Id == _config.GambaSeshUserId && !_gambaSeshPresent) + { + _logger.Info("Received a GambaSesh message after cooldown and while thinking he's not here. Setting the presence flag to avoid spamming chat"); + _gambaSeshPresent = true; + } if (!_seenMsgIds.Contains(message.MessageId) && !_initialStartCooldown) { if (message.MessageRaw.StartsWith("!time"))