diff --git a/irc/server.go b/irc/server.go index 3d51192e..ebd5d3f7 100644 --- a/irc/server.go +++ b/irc/server.go @@ -52,14 +52,15 @@ func NewServer(config *Config) *Server { timeout: make(chan *Client, 16), } - signal.Notify(server.signals, syscall.SIGINT, syscall.SIGHUP) - server.loadChannels() for _, listenerConf := range config.Listeners { go server.listen(listenerConf) } + signal.Notify(server.signals, syscall.SIGINT, syscall.SIGHUP, + syscall.SIGTERM, syscall.SIGQUIT) + return server }