军团活动:粮草先行精度问题

This commit is contained in:
luying
2022-05-26 20:15:10 +08:00
parent 4e24ecd230
commit 1236cd5f99
3 changed files with 9 additions and 6 deletions
@@ -155,10 +155,6 @@ Filter.prototype.before = async function (routeRecord: RouteRecord, msg: any, se
case 'guild.guildHandler.createGuild':
case 'guild.guildHandler.setGuildInfo':
{
if(!guildCode) {
guildCode = genCode(6);
msg.guildCode = guildCode;
}
let result = await checkGuildName(guildCode, serverId, msg.name, msg.notice);
if(!result) hasBlockWords = true;
break;
@@ -166,6 +162,11 @@ Filter.prototype.before = async function (routeRecord: RouteRecord, msg: any, se
}
}
if(routeRecord.route == 'guild.guildHandler.createGuild') {
let guildCode = genCode(6);
msg.guildCode = guildCode;
}
if(hasBlockWords) return next(new Error('globalFilter'), resResult(STATUS.BLOCK_WORDS));
next(null);
+1
View File
@@ -53,6 +53,7 @@ export function guild(session: Session, msg: any, app: Application, cb: (err: Er
let rid = session.get('roleId');
console.log('#### arg', msg.args);
if (msg.args && msg.args.length > 0) {
for (let arg of msg.args) {
if (!arg.route) continue;