From 58020245d7ba75f8d138f7041cd0c0103a319392 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 6 Apr 2025 02:22:04 +0800 Subject: Fix missing initialization of globalData and ircBot --- internal/unsorted/server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/unsorted/server.go b/internal/unsorted/server.go index 12da5cb..29b0fab 100644 --- a/internal/unsorted/server.go +++ b/internal/unsorted/server.go @@ -51,7 +51,9 @@ type Server struct { } func NewServer(configPath string) (*Server, error) { - s := &Server{} + s := &Server{ + globalData: make(map[string]any), + } //exhaustruct:ignore if err := s.loadConfig(configPath); err != nil { return s, err @@ -208,6 +210,7 @@ func (s *Server) Run() error { }() } + s.ircBot = irc.NewBot(&s.config.IRC) // IRC bot go s.ircBot.ConnectLoop() -- cgit v1.2.3