Created /lib/chatsystem.php

Created /lib/chatsystem.php file