diff --git a/irc/chanserv.go b/irc/chanserv.go index 106e92b5..6fb748e5 100644 --- a/irc/chanserv.go +++ b/irc/chanserv.go @@ -462,7 +462,7 @@ func sendTransferPendingNotice(server *Server, account, chname string) { break // prefer the login where the nick is the account } } - client.Send(nil, chanservMask, "NOTICE", client.Nick(), fmt.Sprintf(client.t("You have been offered ownership of channel %s. To accept, /CS TRANSFER ACCEPT %s"), chname, chname)) + client.Send(nil, chanservMask, "NOTICE", client.Nick(), fmt.Sprintf(client.t("You have been offered ownership of channel %[1]s. To accept, /CS TRANSFER ACCEPT %[1]s"), chname)) } func processTransferAccept(client *Client, chname string, rb *ResponseBuffer) { diff --git a/irc/modes.go b/irc/modes.go index 4b14869b..f10454b3 100644 --- a/irc/modes.go +++ b/irc/modes.go @@ -179,9 +179,9 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c appliedChange.Arg = maskAdded applied = append(applied, appliedChange) } else if err != nil { - rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, mask, fmt.Sprintf(client.t("Invalid mode %s parameter: %s"), string(change.Mode), mask)) + rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, mask, fmt.Sprintf(client.t("Invalid mode %[1]s parameter: %[2]s"), string(change.Mode), mask)) } else { - rb.Add(nil, client.server.name, ERR_LISTMODEALREADYSET, chname, mask, string(change.Mode), fmt.Sprintf(client.t("Channel %s list already contains %s"), chname, mask)) + rb.Add(nil, client.server.name, ERR_LISTMODEALREADYSET, chname, mask, string(change.Mode), fmt.Sprintf(client.t("Channel %[1]s list already contains %[2]s"), chname, mask)) } case modes.Remove: @@ -191,9 +191,9 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c appliedChange.Arg = maskRemoved applied = append(applied, appliedChange) } else if err != nil { - rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, mask, fmt.Sprintf(client.t("Invalid mode %s parameter: %s"), string(change.Mode), mask)) + rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, mask, fmt.Sprintf(client.t("Invalid mode %[1]s parameter: %[2]s"), string(change.Mode), mask)) } else { - rb.Add(nil, client.server.name, ERR_LISTMODENOTSET, chname, mask, string(change.Mode), fmt.Sprintf(client.t("Channel %s list does not contain %s"), chname, mask)) + rb.Add(nil, client.server.name, ERR_LISTMODENOTSET, chname, mask, string(change.Mode), fmt.Sprintf(client.t("Channel %[1]s list does not contain %[2]s"), chname, mask)) } } diff --git a/irc/nickserv.go b/irc/nickserv.go index 905e5ef2..ea18ad41 100644 --- a/irc/nickserv.go +++ b/irc/nickserv.go @@ -43,7 +43,7 @@ const ( nsTimeoutNotice = `This nickname is reserved. Please login within %v (using $b/msg NickServ IDENTIFY $b or SASL), or switch to a different nickname.` ) -const nickservHelp = `NickServ lets you register and log into an account.` +const nickservHelp = `NickServ lets you register, log in to, and manage an account.` var ( nickservCommands = map[string]*serviceCommand{ @@ -927,7 +927,7 @@ func nsCertHandler(server *Server, client *Client, command string, params []stri return } certfps := accountData.Credentials.Certfps - nsNotice(rb, fmt.Sprintf(client.t("There are %d certificate fingerprint(s) authorized for account %s."), len(certfps), accountData.Name)) + nsNotice(rb, fmt.Sprintf(client.t("There are %[1]d certificate fingerprint(s) authorized for account %[2]s."), len(certfps), accountData.Name)) for i, certfp := range certfps { nsNotice(rb, fmt.Sprintf("%d: %s", i+1, certfp)) } diff --git a/languages/example/chanserv.lang.json b/languages/example/chanserv.lang.json index b0185748..625cc18d 100644 --- a/languages/example/chanserv.lang.json +++ b/languages/example/chanserv.lang.json @@ -1,11 +1,21 @@ { "$bAMODE$b modifies persistent mode settings for channel members.": "$bAMODE$b modifies persistent mode settings for channel members.", + "$bCLEAR$b removes users or settings from a channel.": "$bCLEAR$b removes users or settings from a channel.", + "$bINFO$b displays info about a registered channel.": "$bINFO$b displays info about a registered channel.", "$bOP$b makes the given user (or yourself) a channel admin.": "$bOP$b makes the given user (or yourself) a channel admin.", + "$bPURGE$b blacklists a channel from the server.": "$bPURGE$b blacklists a channel from the server.", "$bREGISTER$b lets you own a given channel.": "$bREGISTER$b lets you own a given channel.", + "$bTRANSFER$b transfers ownership of a channel to another user.": "$bTRANSFER$b transfers ownership of a channel to another user.", + "$bUNPURGE$b undoes a previous PURGE command.": "$bUNPURGE$b undoes a previous PURGE command.", "$bUNREGISTER$b deletes a channel registration.": "$bUNREGISTER$b deletes a channel registration.", - "ChanServ lets you register and manage channels.\n\nTo see in-depth help for a specific ChanServ command, try:\n $b/CS HELP $b\n\nHere are the commands you can use:\n%s": "ChanServ lets you register and manage channels.\n\nTo see in-depth help for a specific ChanServ command, try:\n $b/CS HELP $b\n\nHere are the commands you can use:\n%s", + "ChanServ lets you register and manage channels.": "ChanServ lets you register and manage channels.", + "Syntax: $INFO #channel$b\n\nINFO displays info about a registered channel.": "Syntax: $INFO #channel$b\n\nINFO displays info about a registered channel.", "Syntax: $bAMODE #channel [mode change] [account]$b\n\nAMODE lists or modifies persistent mode settings that affect channel members.\nFor example, $bAMODE #channel +o dan$b grants the the holder of the \"dan\"\naccount the +o operator mode every time they join #channel. To list current\naccounts and modes, use $bAMODE #channel$b. Note that users are always\nreferenced by their registered account names, not their nicknames.": "Syntax: $bAMODE #channel [mode change] [account]$b\n\nAMODE lists or modifies persistent mode settings that affect channel members.\nFor example, $bAMODE #channel +o dan$b grants the the holder of the \"dan\"\naccount the +o operator mode every time they join #channel. To list current\naccounts and modes, use $bAMODE #channel$b. Note that users are always\nreferenced by their registered account names, not their nicknames.", + "Syntax: $bCLEAR #channel target$b\n\nCLEAR removes users or settings from a channel. Specifically:\n\n$bCLEAR #channel users$b kicks all users except for you.\n$bCLEAR #channel access$b resets all stored bans, invites, ban exceptions,\nand persistent user-mode grants made with CS AMODE.": "Syntax: $bCLEAR #channel target$b\n\nCLEAR removes users or settings from a channel. Specifically:\n\n$bCLEAR #channel users$b kicks all users except for you.\n$bCLEAR #channel access$b resets all stored bans, invites, ban exceptions,\nand persistent user-mode grants made with CS AMODE.", "Syntax: $bOP #channel [nickname]$b\n\nOP makes the given nickname, or yourself, a channel admin. You can only use\nthis command if you're the founder of the channel.": "Syntax: $bOP #channel [nickname]$b\n\nOP makes the given nickname, or yourself, a channel admin. You can only use\nthis command if you're the founder of the channel.", + "Syntax: $bPURGE #channel [reason]$b\n\nPURGE blacklists a channel from the server, making it impossible to join\nor otherwise interact with the channel. If the channel currently has members,\nthey will be kicked from it. PURGE may also be applied preemptively to\nchannels that do not currently have members.": "Syntax: $bPURGE #channel [reason]$b\n\nPURGE blacklists a channel from the server, making it impossible to join\nor otherwise interact with the channel. If the channel currently has members,\nthey will be kicked from it. PURGE may also be applied preemptively to\nchannels that do not currently have members.", "Syntax: $bREGISTER #channel$b\n\nREGISTER lets you own the given channel. If you rejoin this channel, you'll be\ngiven admin privs on it. Modes set on the channel and the topic will also be\nremembered.": "Syntax: $bREGISTER #channel$b\n\nREGISTER lets you own the given channel. If you rejoin this channel, you'll be\ngiven admin privs on it. Modes set on the channel and the topic will also be\nremembered.", + "Syntax: $bTRANSFER [accept] #channel user [code]$b\n\nTRANSFER transfers ownership of a channel from one user to another.\nTo prevent accidental transfers, a verification code is required. For\nexample, $bTRANSFER #channel alice$b displays the required confirmation\ncode, then $bTRANSFER #channel alice 2930242125$b initiates the transfer.\nUnless you are an IRC operator with the correct permissions, alice must\nthen accept the transfer, which she can do with $bTRANSFER accept #channel$b.\nTo cancel a pending transfer, transfer the channel to yourself.": "Syntax: $bTRANSFER [accept] #channel user [code]$b\n\nTRANSFER transfers ownership of a channel from one user to another.\nTo prevent accidental transfers, a verification code is required. For\nexample, $bTRANSFER #channel alice$b displays the required confirmation\ncode, then $bTRANSFER #channel alice 2930242125$b initiates the transfer.\nUnless you are an IRC operator with the correct permissions, alice must\nthen accept the transfer, which she can do with $bTRANSFER accept #channel$b.\nTo cancel a pending transfer, transfer the channel to yourself.", + "Syntax: $bUNPURGE #channel$b\n\nUNPURGE removes any blacklisting of a channel that was previously\nset using PURGE.": "Syntax: $bUNPURGE #channel$b\n\nUNPURGE removes any blacklisting of a channel that was previously\nset using PURGE.", "Syntax: $bUNREGISTER #channel [code]$b\n\nUNREGISTER deletes a channel registration, allowing someone else to claim it.\nTo prevent accidental unregistrations, a verification code is required;\ninvoking the command without a code will display the necessary code.": "Syntax: $bUNREGISTER #channel [code]$b\n\nUNREGISTER deletes a channel registration, allowing someone else to claim it.\nTo prevent accidental unregistrations, a verification code is required;\ninvoking the command without a code will display the necessary code." } diff --git a/languages/example/help.lang.json b/languages/example/help.lang.json index edacaea9..15ef8722 100644 --- a/languages/example/help.lang.json +++ b/languages/example/help.lang.json @@ -8,18 +8,15 @@ "AMBIANCE \n\nThe AMBIANCE command is used to send a scene notification to the given target.": "AMBIANCE \n\nThe AMBIANCE command is used to send a scene notification to the given target.", "AUTHENTICATE\n\nUsed during SASL authentication. See the IRCv3 specs for more info:\nhttp://ircv3.net/specs/extensions/sasl-3.1.html": "AUTHENTICATE\n\nUsed during SASL authentication. See the IRCv3 specs for more info:\nhttp://ircv3.net/specs/extensions/sasl-3.1.html", "AWAY [message]\n\nIf [message] is sent, marks you away. If [message] is not sent, marks you no\nlonger away.": "AWAY [message]\n\nIf [message] is sent, marks you away. If [message] is not sent, marks you no\nlonger away.", + "BATCH {+,-}reference-tag type [params...]\n\nBATCH initiates an IRCv3 client-to-server batch. You should never need to\nissue this command manually.": "BATCH {+,-}reference-tag type [params...]\n\nBATCH initiates an IRCv3 client-to-server batch. You should never need to\nissue this command manually.", "BRB [message]\n\nDisconnects you from the server, while instructing the server to keep you\npresent for a short time window. During this window, you can either resume\nor reattach to your nickname. If [message] is sent, it is used as your away\nmessage (and as your quit message if you don't return in time).": "BRB [message]\n\nDisconnects you from the server, while instructing the server to keep you\npresent for a short time window. During this window, you can either resume\nor reattach to your nickname. If [message] is sent, it is used as your away\nmessage (and as your quit message if you don't return in time).", "CAP [:]\n\nUsed in capability negotiation. See the IRCv3 specs for more info:\nhttp://ircv3.net/specs/core/capability-negotiation-3.1.html\nhttp://ircv3.net/specs/core/capability-negotiation-3.2.html": "CAP [:]\n\nUsed in capability negotiation. See the IRCv3 specs for more info:\nhttp://ircv3.net/specs/core/capability-negotiation-3.1.html\nhttp://ircv3.net/specs/core/capability-negotiation-3.2.html", - "CHANSERV [params]\n\nChanServ controls channel registrations.": "CHANSERV [params]\n\nChanServ controls channel registrations.", "CHATHISTORY [params]\n\nCHATHISTORY is an experimental history replay command. See these documents:\nhttps://github.com/MuffinMedic/ircv3-specifications/blob/chathistory/extensions/chathistory.md\nhttps://gist.github.com/DanielOaks/c104ad6e8759c01eb5c826d627caf80d": "CHATHISTORY [params]\n\nCHATHISTORY is an experimental history replay command. See these documents:\nhttps://github.com/MuffinMedic/ircv3-specifications/blob/chathistory/extensions/chathistory.md\nhttps://gist.github.com/DanielOaks/c104ad6e8759c01eb5c826d627caf80d", - "CS [params]\n\nChanServ controls channel registrations.": "CS [params]\n\nChanServ controls channel registrations.", "DEBUG