mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Changed initial start cooldown so it'll update the flag after the message flood finishes rather than on ping
This commit is contained in:
@@ -116,7 +116,6 @@ public class ChatBot
|
|||||||
{
|
{
|
||||||
_logger.Info("Not pinging the connection as we're currently disconnected");
|
_logger.Info("Not pinging the connection as we're currently disconnected");
|
||||||
}
|
}
|
||||||
if (InitialStartCooldown) InitialStartCooldown = false;
|
|
||||||
var inactivityTime = DateTime.UtcNow - KfClient.LastPacketReceived;
|
var inactivityTime = DateTime.UtcNow - KfClient.LastPacketReceived;
|
||||||
_logger.Debug($"Last KF event was {inactivityTime:g} ago");
|
_logger.Debug($"Last KF event was {inactivityTime:g} ago");
|
||||||
var inactivityTimeout = (await Helpers.GetValue(BuiltIn.Keys.KiwiFarmsInactivityTimeout)).ToType<int>();
|
var inactivityTimeout = (await Helpers.GetValue(BuiltIn.Keys.KiwiFarmsInactivityTimeout)).ToType<int>();
|
||||||
@@ -211,10 +210,12 @@ public class ChatBot
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.Debug($"_seenMsgIds check => {!_seenMsgIds.Contains(message.MessageId)}, _initialStartCooldown => {InitialStartCooldown}");
|
_logger.Debug($"_seenMsgIds check => {!_seenMsgIds.Contains(message.MessageId)}, InitialStartCooldown => {InitialStartCooldown}");
|
||||||
}
|
}
|
||||||
_seenMsgIds.Add(message.MessageId);
|
_seenMsgIds.Add(message.MessageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (InitialStartCooldown) InitialStartCooldown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SentMessageTrackerModel SendChatMessage(string message, bool bypassSeshDetect = false)
|
public SentMessageTrackerModel SendChatMessage(string message, bool bypassSeshDetect = false)
|
||||||
|
|||||||
Reference in New Issue
Block a user