added checks for join/leave/quit commands