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

Add configurable timestamp to console messages #3811

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
6 participants
@ShadowNinja
Member

ShadowNinja commented Mar 3, 2016

Closes #3716.

This also does some chat backend cleanup (to fix a bug) and getTime cleanup (so overflow won't be an issue).

@Fixer-007

This comment has been minimized.

Show comment
Hide comment
@Fixer-007

Fixer-007 Mar 3, 2016

Contributor

Can't compile with it, error in chat.cpp:257:44: localtime_r was not declared in this scope

Contributor

Fixer-007 commented Mar 3, 2016

Can't compile with it, error in chat.cpp:257:44: localtime_r was not declared in this scope

@ShadowNinja

This comment has been minimized.

Show comment
Hide comment
@ShadowNinja

ShadowNinja Mar 4, 2016

Member

I'll have to add a fallback to the unsafe localtime.

Member

ShadowNinja commented Mar 4, 2016

I'll have to add a fallback to the unsafe localtime.

@ShadowNinja

This comment has been minimized.

Show comment
Hide comment
@ShadowNinja

ShadowNinja Mar 5, 2016

Member

@Fixer-007: I've added fallbacks, try now.

Member

ShadowNinja commented Mar 5, 2016

@Fixer-007: I've added fallbacks, try now.

@paramat paramat added the One approval label Mar 5, 2016

@paramat

This comment has been minimized.

Show comment
Hide comment
@paramat

paramat Mar 5, 2016

Member

Adding 'one approval' as the author's approval.

Member

paramat commented Mar 5, 2016

Adding 'one approval' as the author's approval.

@ShadowNinja

This comment has been minimized.

Show comment
Hide comment
@ShadowNinja

ShadowNinja Mar 5, 2016

Member

@paramat: Nope, still has an important bug, see description.
I don't know what the cause of the bug is. I'm guessing it's something in formatChatLine, but it's really hard to understand what that code is doing.

Member

ShadowNinja commented Mar 5, 2016

@paramat: Nope, still has an important bug, see description.
I don't know what the cause of the bug is. I'm guessing it's something in formatChatLine, but it's really hard to understand what that code is doing.

@ShadowNinja

This comment has been minimized.

Show comment
Hide comment
@ShadowNinja

ShadowNinja Mar 6, 2016

Member

I just rewrote formatChatLine from scratch. Now it works and the code is much simpler.

Also, I removed the age field from chat messages and replaced it with a monotonic time_raw value that doesn't have to be constantly updated. I also switched the getTime helpers to 64-bit so that overflow won't be an issue.

Member

ShadowNinja commented Mar 6, 2016

I just rewrote formatChatLine from scratch. Now it works and the code is much simpler.

Also, I removed the age field from chat messages and replaced it with a monotonic time_raw value that doesn't have to be constantly updated. I also switched the getTime helpers to 64-bit so that overflow won't be an issue.

@ShadowNinja

This comment has been minimized.

Show comment
Hide comment
@ShadowNinja

ShadowNinja Mar 7, 2016

Member

@Fixer-007: Fixed that, I was using a Vista function but we force the XP API. Compiles on Windows now.

Member

ShadowNinja commented Mar 7, 2016

@Fixer-007: Fixed that, I was using a Vista function but we force the XP API. Compiles on Windows now.

@ShadowNinja

This comment has been minimized.

Show comment
Hide comment
@ShadowNinja

ShadowNinja Mar 8, 2016

Member

I've fixed the server command issue and the issue with Windows not supporting the default time stamp format.

Member

ShadowNinja commented Mar 8, 2016

I've fixed the server command issue and the issue with Windows not supporting the default time stamp format.

ShadowNinja added some commits Mar 3, 2016

Clean up getTime helpers
This increases size of the getTime return values to 64 bits.
It also removes the TimeGetter classes since the getTime functions
are now very precise.
Clean up chat console
I had a hard time decyphering formatChatLine, so I rewrote it to be much
simpler.  I also tweaked the rest of the chat helpers.
@sofar

This comment has been minimized.

Show comment
Hide comment
@sofar

sofar Mar 8, 2016

Member

Tested basic functionality, works OK!

Member

sofar commented Mar 8, 2016

Tested basic functionality, works OK!

@Fixer-007

This comment has been minimized.

Show comment
Hide comment
@Fixer-007

Fixer-007 Mar 8, 2016

Contributor

Tested, works for me 👍 Bumping this up.

Contributor

Fixer-007 commented Mar 8, 2016

Tested, works for me 👍 Bumping this up.

@sofar sofar added the Rebase needed label Oct 27, 2016

@paramat paramat removed the Enhancement label Oct 29, 2016

@Fixer-007

This comment has been minimized.

Show comment
Hide comment
@Fixer-007

Fixer-007 Apr 7, 2017

Contributor

Suddenly there are already CSM mods available that add data/time info into chat console.
Is this PR still viable?

Contributor

Fixer-007 commented Apr 7, 2017

Suddenly there are already CSM mods available that add data/time info into chat console.
Is this PR still viable?

@nerzhul

This comment has been minimized.

Show comment
Hide comment
@nerzhul

nerzhul Apr 7, 2017

Member

i think it can be made obsolete

Member

nerzhul commented Apr 7, 2017

i think it can be made obsolete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment