fix #2284 (#2317)
Some checks are pending
build / build (push) Waiting to run
ghcr / Build (push) Waiting to run

Send a configurable NOTICE on first connection that hopm can
detect via target_string
This commit is contained in:
Shivaram Lingamneni 2025-12-30 02:27:09 -05:00 committed by GitHub
parent b26571e891
commit 13653b5202
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 2 deletions

View file

@ -414,6 +414,11 @@ func (server *Server) RunClient(conn IRCConn) {
session.certfp, session.peerCerts, _ = utils.GetCertFP(wConn.Conn, RegisterTimeout)
}
if config.Server.InitialNotice != "" {
// send initial notice for HOPM to recognize
client.Send(nil, client.server.name, "NOTICE", "*", config.Server.InitialNotice)
}
if session.isTor {
session.rawHostname = config.Server.TorListeners.Vhost
client.rawHostname = session.rawHostname

View file

@ -580,7 +580,8 @@ type Config struct {
CoerceIdent string `yaml:"coerce-ident"`
MOTD string
motdLines []string
MOTDFormatting bool `yaml:"motd-formatting"`
MOTDFormatting bool `yaml:"motd-formatting"`
InitialNotice string `yaml:"initial-notice"`
IdleTimeouts struct {
Registration time.Duration
Ping time.Duration