Reworked a bit message handling from previous commit
Ported cockatrice