Remove extraneous chat types from subtypes
This commit is contained in:
parent
9d50d224ae
commit
4c04d06673
5 changed files with 6 additions and 8 deletions
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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(': ')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue