Variable: erc-server-processing-p
erc-server-processing-p is a buffer-local variable defined in
erc-backend.el.gz.
Documentation
Non-nil when we're currently processing a message.
When ERC receives a private message, it sets up a new buffer for this query. These in turn, though, do start flyspell. This involves starting an external process, in which case Emacs will wait - and when it waits, it does accept other stuff from, say, network exceptions. So, if someone sends you two messages quickly after each other, ispell is started for the first, but might take long enough for the second message to be processed first.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-backend.el.gz
;; From Circe
(defvar-local erc-server-processing-p nil
"Non-nil when we're currently processing a message.
When ERC receives a private message, it sets up a new buffer for
this query. These in turn, though, do start flyspell. This
involves starting an external process, in which case Emacs will
wait - and when it waits, it does accept other stuff from, say,
network exceptions. So, if someone sends you two messages
quickly after each other, ispell is started for the first, but
might take long enough for the second message to be processed
first.")