Added option to pull IP from database