Skip to content

fix #858 and #383#1004

Merged
slingamn merged 4 commits intoergochat:masterfrom
slingamn:vanish.4
May 14, 2020
Merged

fix #858 and #383#1004
slingamn merged 4 commits intoergochat:masterfrom
slingamn:vanish.4

Conversation

@slingamn
Copy link
Copy Markdown
Member

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.

@slingamn
Copy link
Copy Markdown
Member Author

Might be worth reviewing the config changes and the command syntax?

irc/histserv.go Outdated
}

config := server.Config()
filename := fmt.Sprintf("%s@%s.json", cfAccount, time.Now().UTC().Format(IRCv3TimestampFormat))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

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()))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

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))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

%s to file %s -> %[1]s to file %[2]s so translators can re-arrange the args

@slingamn slingamn merged commit a46c0ee into ergochat:master May 14, 2020
@slingamn slingamn deleted the vanish.4 branch May 20, 2020 16:52
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.

2 participants