This commit is contained in:
kaguramaisakuya 2024-08-18 17:07:26 +08:00
parent dbb4bb3674
commit 3266babc30
5 changed files with 5 additions and 5 deletions

View File

@ -114,7 +114,7 @@ let Avatar = {
if (!Common.cfg('avatarCard')) {
return false
}
let uidRet = /[0-9]{9}/.exec(msg)
let uidRet = /(18|[1-9])[0-9]{8}/g.exec(msg)
if (uidRet) {
e.uid = uidRet[0]
msg = msg.replace(uidRet[0], '')

View File

@ -87,7 +87,7 @@ app.reg({
name: '角色查询',
fn: ProfileStat.avatarList,
rule: /^#喵喵(角色|查询)[ |0-9]*$/,
yzRule: /^(#(五|四|5|4|星)*(角色|查询|查询角色|角色查询|人物)[ |0-9]*$)|(^(#*uid|#*UID)\+*([1-9]|18)[0-9]{8}$)|(^#[\+|]*([1-9]|18)[0-9]{8})/,
yzRule: /^(#(五|四|5|4|星)*(角色|查询|查询角色|角色查询|人物)[ |0-9]*$)|(^(#*uid|#*UID)\+*(18|[1-9])[0-9]{8}$)|(^#[\+|]*(18|[1-9])[0-9]{8})/,
yzCheck: () => Cfg.get('avatarList', false)
},

View File

@ -8,7 +8,7 @@ import { miaoPath } from '#miao.path'
* 获取面板查询的 目标uid
* */
const _getTargetUid = async function (e) {
let uidReg = /([1-9]|18)[0-9]{8}/
let uidReg = /(18|[1-9])[0-9]{8}/
if (e.uid && uidReg.test(e.uid)) {
return e.uid

View File

@ -42,7 +42,7 @@ let ProfileDetail = {
e._profileMsg = changeMsg
}
}
let uidRet = /[0-9]{9}/.exec(msg)
let uidRet = /(18|[1-9])[0-9]{8}/g.exec(msg)
if (uidRet) {
e.uid = uidRet[0]
msg = msg.replace(uidRet[0], '')

View File

@ -18,7 +18,7 @@ const ProfileAvatar = {
return false
}
let { uid, e } = player
if (uid.toString().length !== 9 || !e) {
if (![9, 10].includes(uid.toString().length) || !e) {
return false
}
let ret = await Serv.req(e, player)