refactor ChatDB from zchat so it can be used for the normal server too