added command functionality to chat windows

Also added a new command to clear the window