* lisp/erc/erc-backend.el (erc-server-reconnect-timeout): Mention
`erc-nickname-in-use-functions' in doc string.
* lisp/erc/erc.el (erc-nickname-in-use-functions,
erc-regain-nick-on-connect): Add abnormal hook and possible value to
handle stale connections preventing a desired nick from being reissued
by the server. Follows directly from bug#62044.
(erc-nickname-in-use): Call `erc-nickname-in-use-functions'.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-auto-regain): New test.
* test/lisp/erc/resources/base/renick/regain/normal-again.eld: New file.
* test/lisp/erc/resources/base/renick/regain/normal.eld: New file.