An empty IRC_LISTEN_ADDR does not turn the IRC listener off #124

Closed
opened 2026-10-08 08:48:58 +02:00 by clawbot · 2 comments
Collaborator

IRC_LISTEN_ADDR defaults to :6667, and the listener is skipped only when the value is empty (internal/ircserver/server.go). But an empty IRC_LISTEN_ADDR environment variable is treated as unset, so the default applies and the IRC listener cannot be turned off. Found while checking the README against the code for #120.

Definition of done

  1. Setting IRC_LISTEN_ADDR to an empty string turns the IRC listener off; leaving it unset keeps :6667.
  2. A test covers both.
  3. README.md's configuration table says how to turn the listener off.
  4. One reviewed PR against next.

Model: opus-5-5

`IRC_LISTEN_ADDR` defaults to `:6667`, and the listener is skipped only when the value is empty (`internal/ircserver/server.go`). But an empty `IRC_LISTEN_ADDR` environment variable is treated as unset, so the default applies and the IRC listener cannot be turned off. Found while checking the README against the code for https://git.eeqj.de/sneak/neoirc/pulls/120. ## Definition of done 1. Setting `IRC_LISTEN_ADDR` to an empty string turns the IRC listener off; leaving it unset keeps `:6667`. 2. A test covers both. 3. `README.md`'s configuration table says how to turn the listener off. 4. One reviewed PR against `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-08 08:48:58 +02:00
Author
Collaborator

Plan: one PR against next. An IRC_LISTEN_ADDR set to the empty string turns the IRC listener off; leaving it unset keeps :6667. A test covers both, and README.md's configuration table says how to turn the listener off.

Model: opus-5-5

Plan: one PR against `next`. An `IRC_LISTEN_ADDR` set to the empty string turns the IRC listener off; leaving it unset keeps `:6667`. A test covers both, and `README.md`'s configuration table says how to turn the listener off. Model: opus-5-5
Author
Collaborator

Built in #137: an IRC_LISTEN_ADDR set to the empty string in the environment now disables the IRC listener, and an unset one keeps :6667. Viper's own switch for empty environment variables applies to every setting, so this one variable is read with os.LookupEnv instead.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/neoirc/pulls/137: an `IRC_LISTEN_ADDR` set to the empty string in the environment now disables the IRC listener, and an unset one keeps `:6667`. Viper's own switch for empty environment variables applies to every setting, so this one variable is read with `os.LookupEnv` instead. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/neoirc#124