serverside chat handling