Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle game chats and write them into the log #421

Merged
merged 1 commit into from
May 21, 2024
Merged

Conversation

windo
Copy link
Contributor

@windo windo commented May 15, 2024

Players sometimes say things in the game chat, which I would be interested in at least becoming aware of.

This ought to address #258

@windo
Copy link
Contributor Author

windo commented May 15, 2024

I'm not entirely confident that it wouldn't be a better idea to still try to just connectToGame from main and make sure Game can see the game is finished and will disconnect?

Also, should this be optional?

@windo
Copy link
Contributor Author

windo commented May 15, 2024

Oof, I've messed something up and it doesn't pick up chats during the game, will check later.

@windo
Copy link
Contributor Author

windo commented May 15, 2024

Ought to be fixed. I'm running it on my bots now and they log when I chat with them during or after a game.

if (line.username === config.username) {
return;
}
if (line.date < cutoff_timestamp) {
Copy link
Contributor

@raylu raylu May 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dunno if it's worth noting that converting new Date() to a number gives you epoch time and line.date is also epoch time

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you felt like asking, I'm happy to add a note!

src/Game.ts Outdated
});
}

trace.log("connecting");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably remove this or mention what game we're connecting for if you keep it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, yes, this was a leftover from debugging, will remove!

Players sometimes say things in the game chat, which I would be
interested in at least becoming aware of.
@roy7 roy7 merged commit b9e984c into online-go:devel May 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants