mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
Don't sprintf with no arguments in Command.Reply
This commit is contained in:
parent
099006c9c3
commit
7e738485ee
1 changed files with 4 additions and 1 deletions
|
@ -50,7 +50,10 @@ type Command struct {
|
|||
type CommandAutocomplete Command
|
||||
|
||||
func (cmd *Command) Reply(message string, args ...interface{}) {
|
||||
cmd.Room.AddServiceMessage(fmt.Sprintf(message, args...))
|
||||
if len(args) > 0 {
|
||||
message = fmt.Sprintf(message, args...)
|
||||
}
|
||||
cmd.Room.AddServiceMessage(message)
|
||||
cmd.UI.Render()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue