From f40dbc7bec33b9750f4dc8eaa7d4f383848b3c12 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 26 Jan 2017 08:08:40 +0100 Subject: [PATCH] Users can no longer submit multiple sentences in acrophobia --- src/NadekoBot/Modules/Games/Commands/Acropobia.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Games/Commands/Acropobia.cs b/src/NadekoBot/Modules/Games/Commands/Acropobia.cs index 2a7307bb..b379e473 100644 --- a/src/NadekoBot/Modules/Games/Commands/Acropobia.cs +++ b/src/NadekoBot/Modules/Games/Commands/Acropobia.cs @@ -69,6 +69,7 @@ namespace NadekoBot.Modules.Games private readonly ConcurrentDictionary submissions = new ConcurrentDictionary(); public IReadOnlyDictionary Submissions => submissions; + private readonly ConcurrentHashSet usersWhoSubmitted = new ConcurrentHashSet(); private readonly ConcurrentHashSet usersWhoVoted = new ConcurrentHashSet(); private int spamCount = 0; @@ -191,8 +192,7 @@ namespace NadekoBot.Modules.Games catch { } } //user didn't input something already - IGuildUser throwaway; - if (submissions.TryGetValue(input, out throwaway)) + if (!usersWhoSubmitted.Add(guildUser.Id)) return; var inputWords = input.Split(' '); //get all words