You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it'd be great if Punk could show past chat histories after a restart. I tried this today, did a "test chat" with a friend, restarted Punk, and the past chat posts were gone.
Since Punk keeps logs anyway, I imagine it wouldn't be hard to load those and display them. The Steam client usually displays the last couple lines from previous chats, and having the Punk client display the entirety (or, if preferences are implemented some day, a customisable amount of past chats) would be a feature I've always missed with the default client.
The text was updated successfully, but these errors were encountered:
Yep, I was thinking about using the chat log to load previous chats messages - the only problem is that the chat log is stored in a human-readable file but it's not very easy to parse.
Official Steam client loads the last few messages from Steam servers, so I might implement that as well. However, that would only provide very limited functionality - like 10 last messages or so.
I'm not a pro with JS, but wouldn't you be able to do a bit of RegEx magic on the logs? I assume it can't be that hard.
/\[([0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{2}:[0-9]{2}:[0-9]{2})\]/ would get the date string, which IIRC is in a format JavaScript Date can read, and getting the chat text should be manageable as well. Get the posts separated by doing Array.split() with newline char on the text file. I'd say parsing the usernames to match SteamIDs would be the only hard part.
Hi,
it'd be great if Punk could show past chat histories after a restart. I tried this today, did a "test chat" with a friend, restarted Punk, and the past chat posts were gone.
Since Punk keeps logs anyway, I imagine it wouldn't be hard to load those and display them. The Steam client usually displays the last couple lines from previous chats, and having the Punk client display the entirety (or, if preferences are implemented some day, a customisable amount of past chats) would be a feature I've always missed with the default client.
The text was updated successfully, but these errors were encountered: