Chat code does not work

code has gotten messed up...