fix the db and add ip query using qqwry & maxmind