Don't sprintf with no arguments in Command.Reply
This commit is contained in:
parent
099006c9c3
commit
7e738485ee
@ -50,7 +50,10 @@ type Command struct {
|
|||||||
type CommandAutocomplete Command
|
type CommandAutocomplete Command
|
||||||
|
|
||||||
func (cmd *Command) Reply(message string, args ...interface{}) {
|
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()
|
cmd.UI.Render()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user