강동현

닉네임 제약 조건 추가

......@@ -77,6 +77,10 @@ export class Connection {
private handleLogin(
message: ServerInboundMessage<"login">
): ServerResponse<"login"> {
if (message.nickname.length > 12 || message.nickname.trim().length === 0) {
return { ok: false };
}
this.user = new User(message.nickname, this);
// console.log(`User ${message.username} has logged in!`);
......