mark client as unregistered when the connection is closed

This commit is contained in:
emerson 2023-07-03 13:12:53 +00:00
parent c37642a9ee
commit 9f8ecca96b

View file

@ -6,7 +6,7 @@ export class IRCClient extends Client {
constructor(private socket: Socket , public server: IRCServer) {
super(server);
this.socket.on('data', (data) => this.receiveData(data));
this.socket.on('close', (e) => {this.closeConnection()});
this.socket.on('close', (e) => {this.isRegistered = false; this.closeConnection()});
this.server.doLog("New IRCClient connected");
}