mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 18:43:41 -05:00
Disable replies if a command's room is nil
This is implemented to prevent crashes on headless start, where verification is performed without a specific room.
This commit is contained in:
parent
e4c71fde7c
commit
89dd9f9a6a
1 changed files with 3 additions and 1 deletions
|
@ -53,7 +53,9 @@ func (cmd *Command) Reply(message string, args ...interface{}) {
|
|||
if len(args) > 0 {
|
||||
message = fmt.Sprintf(message, args...)
|
||||
}
|
||||
if cmd.Room != nil {
|
||||
cmd.Room.AddServiceMessage(message)
|
||||
}
|
||||
cmd.UI.Render()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue