erc-track-visibility

erc-track-visibility is a variable defined in `erc-track.el'.
Its value is
t


Documentation:
Where do we look for buffers to determine their visibility?
The value of this variable determines, when a buffer is considered
visible or invisible. New messages in invisible buffers are tracked,
while switching to visible buffers when they are tracked removes them
from the list. See also `erc-track-when-inactive'.

Possible values are:

t - all frames
visible - all visible frames
nil - only the selected frame
selected-visible - only the selected frame if it is visible

Activity means that there was no user input in the last 10 seconds.

You can customize this variable.