Remove extraneous chat types from subtypes

This commit is contained in:
7cc5c4f330d47060 2024-09-19 22:47:29 -04:00
parent 9d50d224ae
commit 4c04d06673
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA
5 changed files with 6 additions and 8 deletions

View file

@ -5,11 +5,10 @@ module.exports = {
if (data.json.translate === '%s %s %s' || data.json.translate === '[%s] %s %s') {
let subtype = 'chipmunkmod_'
if (data.json.translate === '%s %s %s') {
subtype += 'name3_'
subtype += 'name3'
} else if (data.json.translate === '[%s] %s %s') {
subtype += 'chomens_'
subtype += 'chomens'
}
subtype += `${data.type}`
if (data.json.with && data.json.with[1] && data.json.with[2]) {
const username = parsePlain(data.json.with[1])
const uuid = b.findUUID(username)

View file

@ -11,7 +11,7 @@ module.exports = {
parsed: true,
json: data.json,
type: data.type,
subtype: `chipmunkmod_mcp_${data.type}`,
subtype: `chipmunkmod_mcp`,
uuid,
message,
nickname,

View file

@ -5,7 +5,7 @@ module.exports = {
parsed: true,
json: data.json,
type: data.type,
subtype: `generic_${data.type}`,
subtype: `generic_player`,
uuid: data.uuid,
message: data.message,
nickname: data.nickname,

View file

@ -2,7 +2,7 @@ const parsePlain = require('../../util/chatparse_plain.js')
module.exports = {
parse: (data, b) => {
if (data.type === 'system' || data.type === 'legacy') {
let subtype = `generic_${data.type}`
let subtype = `generic_system`
if (data.type === 'legacy' && data.uuid) subtype += '_withuuid'
const parsed = parsePlain(data.json)
const split = parsed.split(': ')

View file

@ -2,8 +2,7 @@ const parsePlain = require('../../util/chatparse_plain.js')
module.exports = {
parse: (data, b) => {
if (data.type === 'legacy') {
if (data.parsed) return
let subtype = `vanilla_${data.type}`
let subtype = `vanilla_legacy`
if (data.type === 'legacy' && data.uuid) subtype += '_withuuid'
if (data.json.translate === 'chat.type.text') { // Servers without Extras chat
let message