mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-17 05:37:46 +00:00
feat:拦截国际服
This commit is contained in:
parent
7ffe3e6451
commit
1dd7fe9fb5
2 changed files with 9 additions and 9 deletions
|
|
@ -29,6 +29,10 @@ export class Panel extends ZZZPlugin {
|
|||
}
|
||||
async bindDevice() {
|
||||
const uid = await this.getUID();
|
||||
if (/^(1[0-9])[0-9]{8}/i.test(uid)) {
|
||||
await this.reply('国际服不需要绑定设备');
|
||||
return false;
|
||||
}
|
||||
//先throw一步(
|
||||
this.setContext('toBindDevice');
|
||||
await this.reply(
|
||||
|
|
@ -97,6 +101,8 @@ export class Panel extends ZZZPlugin {
|
|||
}
|
||||
}
|
||||
async deleteBind() {
|
||||
const uid = await this.getUID();
|
||||
if (/^(1[0-9])[0-9]{8}/i.test(uid)) return false;
|
||||
const ltuid = await this.getLtuid();
|
||||
await redis.del(`ZZZ:DEVICE_FP:${ltuid}:FP`);
|
||||
await redis.del(`ZZZ:DEVICE_FP:${ltuid}:BIND`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue