I think we should do something similar to CheckUserHooks::getClientIPfromXFF( $xff ) here