erc-once-with-server-event
erc-once-with-server-event is a compiled Lisp function in `erc.el
'.
(erc-once-with-server-event EVENT F)
Run function F the next time EVENT occurs in the `current-buffer'.
You should make sure that `current-buffer' is a server buffer.
This function temporarily adds a function to EVENT's hook to call F with
two arguments (`proc' and `parsed'). After F is called, the function is
removed from EVENT's hook. F should return either nil
or t, where nil indicates that the other functions on EVENT's hook
should be run too, and t indicates that other functions should
not be run.
Please be sure to use this function in server-buffers. In
channel-buffers it may not work at all, as it uses the LOCAL
argument of `add-hook' and `remove-hook' to ensure multiserver
capabilities.