erc-insert-pre-hook

erc-insert-pre-hook is a variable defined in `erc.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
Hook called first when some text is inserted through `erc-display-line'.
It gets called with one argument, STRING.
To be able to modify the inserted text, use `erc-insert-modify-hook' instead.
Filtering functions can set `erc-insert-this' to nil to avoid
display of that particular string at all.

You can customize this variable.