From 89dd9f9a6a6a1879b5782e4e8952b4f9da88f062 Mon Sep 17 00:00:00 2001 From: FIGBERT Date: Sat, 24 Jun 2023 12:42:03 +0300 Subject: [PATCH] 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. --- ui/command-processor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/command-processor.go b/ui/command-processor.go index 0be8071..31efade 100644 --- a/ui/command-processor.go +++ b/ui/command-processor.go @@ -53,7 +53,9 @@ func (cmd *Command) Reply(message string, args ...interface{}) { if len(args) > 0 { message = fmt.Sprintf(message, args...) } - cmd.Room.AddServiceMessage(message) + if cmd.Room != nil { + cmd.Room.AddServiceMessage(message) + } cmd.UI.Render() }