Skip to content

Commit 3c928e4

Browse files
committed
Prevent infinite loop if voice purge is disabled
1 parent d58c06f commit 3c928e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Events/VoiceEvents.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public static async Task VoiceStateUpdate(DiscordClient client, VoiceStateUpdate
3939
if (PendingPurge.Contains(e.Before.Channel.Id))
4040
return;
4141

42-
PendingPurge.Add(e.Before.Channel.Id);
42+
if (Program.cfgjson.VoiceChannelPurge)
43+
PendingPurge.Add(e.Before.Channel.Id);
4344

4445
for (int i = 0; i <= 12; i++)
4546
{

0 commit comments

Comments
 (0)