erc-server-connected is a variable defined in `erc-backend.el'.
Its value is
nil
Automatically becomes buffer-local when set.
Documentation:
Non-nil if the current buffer has been used by ERC to establish
an IRC connection.
If you wish to determine whether an IRC connection is currently
active, use the `erc-server-process-alive' function instead.