소스 검색

modding #1858

(cherry picked from commit 2abeb38d64)
tags/v0.10.5.2
Shaun 2 년 전
committed by Big Bad Waffle
부모
커밋
68439acc02
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. +13
    -0
      src/server/components/auth.js

+ 13
- 0
src/server/components/auth.js 파일 보기

@@ -260,6 +260,7 @@ module.exports = {

if (credentials.username === '' || credentials.password === '') {
msg.callback(messages.login.allFields);

return;
}

@@ -279,6 +280,18 @@ module.exports = {
msg.callback(messages.login.incorrect);
return;
}

const emBeforeLogin = {
obj: this.obj,
success: true,
msg: null
};
await eventEmitter.emit('onBeforeLogin', emBeforeLogin);
if (!emBeforeLogin.success) {
msg.callback(emBeforeLogin.msg);

return;
}
this.username = username;
await cons.logOut(this.obj);


불러오는 중...
취소
저장