code: public int adjustTypeByMode (int mode, int type)
      {
          switch (mode) {
          case ChatCodes.DEFAULT_MODE:
              return type | SPEAK;
          case ChatCodes.EMOTE_MODE:
              return type | EMOTE;
          case ChatCodes.THINK_MODE:
              return type | THINK;
          case ChatCodes.SHOUT_MODE:
              return type | SHOUT;
          case ChatCodes.BROADCAST_MODE:
              return BROADCAST; // broadcast always looks like broadcast
          default:
              return type;
          }
      }
docs: Adjust the chat type based on the mode of the chat message.