version 2.2 chat_warn and corrected undeclared globals