From 36dab4e57d445ac2f492423709f5c0e2f7a116fa Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Fri, 8 May 2020 02:47:08 -0400 Subject: [PATCH] review fix --- irc/chanserv.go | 2 +- irc/handlers.go | 2 +- irc/hostserv.go | 2 +- irc/nickserv.go | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/irc/chanserv.go b/irc/chanserv.go index e34ab4c1..ce225da7 100644 --- a/irc/chanserv.go +++ b/irc/chanserv.go @@ -407,7 +407,7 @@ func csUnregisterHandler(server *Server, client *Client, command string, params expectedCode := utils.ConfirmationCode(info.Name, info.RegisteredAt) if expectedCode != verificationCode { csNotice(rb, ircfmt.Unescape(client.t("$bWarning: unregistering this channel will remove all stored channel attributes.$b"))) - csNotice(rb, fmt.Sprintf(client.t("To confirm channel unregistration, type: /CS UNREGISTER %[1]s %[2]s"), channelKey, expectedCode)) + csNotice(rb, fmt.Sprintf(client.t("To confirm, run this command: %s"), fmt.Sprintf("/CS UNREGISTER %s %s", channelKey, expectedCode))) return } diff --git a/irc/handlers.go b/irc/handlers.go index 8f1e6ad7..b3418711 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -713,7 +713,7 @@ func debugHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Res } code := utils.ConfirmationCode(server.name, server.ctime) if len(msg.Params) == 1 || msg.Params[1] != code { - rb.Notice(fmt.Sprintf(client.t("To crash the server, issue the following command: /DEBUG CRASHSERVER %s"), code)) + rb.Notice(fmt.Sprintf(client.t("To confirm, run this command: %s"), fmt.Sprintf("/DEBUG CRASHSERVER %s", code))) return false } server.logger.Error("server", fmt.Sprintf("DEBUG CRASHSERVER executed by operator %s", client.Oper().Name)) diff --git a/irc/hostserv.go b/irc/hostserv.go index 3247ab2d..7c983f12 100644 --- a/irc/hostserv.go +++ b/irc/hostserv.go @@ -451,7 +451,7 @@ func hsSetCloakSecretHandler(server *Server, client *Client, command string, par expectedCode := utils.ConfirmationCode(secret, server.ctime) if len(params) == 1 || params[1] != expectedCode { hsNotice(rb, ircfmt.Unescape(client.t("$bWarning: changing the cloak secret will invalidate stored ban/invite/exception lists.$b"))) - hsNotice(rb, fmt.Sprintf(client.t("To confirm, type: /HS SETCLOAKSECRET %[1]s %[2]s"), secret, expectedCode)) + hsNotice(rb, fmt.Sprintf(client.t("To confirm, run this command: %s"), fmt.Sprintf("/HS SETCLOAKSECRET %s %s", secret, expectedCode))) return } StoreCloakSecret(server.store, secret) diff --git a/irc/nickserv.go b/irc/nickserv.go index 8e94de7e..47e2a18e 100644 --- a/irc/nickserv.go +++ b/irc/nickserv.go @@ -905,11 +905,10 @@ func nsUnregisterHandler(server *Server, client *Client, command string, params if expectedCode != verificationCode { if erase { nsNotice(rb, ircfmt.Unescape(client.t("$bWarning: erasing this account will allow it to be re-registered; consider UNREGISTER instead.$b"))) - nsNotice(rb, fmt.Sprintf(client.t("To confirm account erase, type: /NS ERASE %[1]s %[2]s"), accountName, expectedCode)) } else { nsNotice(rb, ircfmt.Unescape(client.t("$bWarning: unregistering this account will remove its stored privileges.$b"))) - nsNotice(rb, fmt.Sprintf(client.t("To confirm account unregistration, type: /NS UNREGISTER %[1]s %[2]s"), accountName, expectedCode)) } + nsNotice(rb, fmt.Sprintf(client.t("To confirm, run this command: %s"), fmt.Sprintf("/NS UNREGISTER %s %s", accountName, expectedCode))) return }