I tried doing it, but the hat didn't disappear. but I encountered some oddities when I tried to switch hats.
when I typed /hat Asshat after /hat Sombrero, the hat appeared but it was clipping with the sombrero. it didn't disappear.
It was Bot_Blockoshooter