Merged
Conversation
Member
Author
|
Might be worth reviewing the config changes and the command syntax? |
DanielOaks
reviewed
May 12, 2020
DanielOaks
reviewed
May 12, 2020
irc/histserv.go
Outdated
| } | ||
|
|
||
| config := server.Config() | ||
| filename := fmt.Sprintf("%s@%s.json", cfAccount, time.Now().UTC().Format(IRCv3TimestampFormat)) |
Member
There was a problem hiding this comment.
hm, is there any way this can be used dodgily? writing to disk based on account name makes me a bit nervous and I'd like to see whether this can be broken in any way
DanielOaks
reviewed
May 12, 2020
irc/histserv.go
Outdated
|
|
||
| client := server.clients.Get(alertNick) | ||
| if client != nil && client.HasRoleCapabs("history") { | ||
| client.Send(nil, histServMask, "NOTICE", client.Nick(), fmt.Sprintf(client.t("Data export for %[1]s completed and written to %[2]s"), cfAccount, outfile.Name())) |
Member
There was a problem hiding this comment.
Is there any concern here with giving the full file path? shouldn't be a drama but may be cleaner to e.g. split by \ and / and return only the last portion or something
DanielOaks
reviewed
May 13, 2020
irc/histserv.go
Outdated
| hsNotice(rb, fmt.Sprintf(client.t("Error opening export file: %v"), err)) | ||
| } else { | ||
| hsNotice(rb, fmt.Sprintf(client.t("Started exporting account data to file %s"), pathname)) | ||
| hsNotice(rb, fmt.Sprintf(client.t("Started exporting data for account %s to file %s"), cfAccount, filename)) |
Member
There was a problem hiding this comment.
%s to file %s -> %[1]s to file %[2]s so translators can re-arrange the args
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is kind of lame. Probably no one will ever use #858. But it's important to be able to claim the ability to do it.