move some erc

Signed-off-by: coldnew <coldnew.tw@gmail.com>
move some erc code

Signed-off-by: coldnew <coldnew.tw@gmail.com>