chatmod logic