moved PING replies to IRC middleware

remove duplicate funtions