ljsnell / PokemonShowdownSpectator

Spectates Pokemon Showdown Matches
MIT License
2 stars 1 forks source link

`getWinner` vulnerable to chat interference #7

Open githubpsyche opened 4 years ago

githubpsyche commented 4 years ago

There's a potential bug in getWinner within get_names.py: Unless player chat is filtered out somehow, if a player says " won ", getWinner can fail.

ljsnell commented 4 years ago

Hmm, good catch! Not sure if there's a better way to account for this than the chat logs. Ideally using a backend API would be preferred so we can ignore chat entirely would be preferred, didn't see one that existed though. (But I might have just missed it).