Move mode change processing to the core
Fix checking of limit parameter
Fix issues with knock on knock and invite