Database now stores hashes of recently used IP's for all users. They are retained for seven days AFTER their LAST use.
This commit is contained in:
parent
6b0a73e1c8
commit
6e785dc211
6 changed files with 112 additions and 12 deletions
|
|
@ -33,6 +33,19 @@ module.exports = class{
|
|||
this.sockets = [socket.id];
|
||||
}
|
||||
|
||||
async handleConnection(userDB, chanDB, socket){
|
||||
//send metadata to client
|
||||
await this.sendClientMetadata();
|
||||
|
||||
//Send out emotes
|
||||
await this.sendSiteEmotes();
|
||||
await this.sendChanEmotes(chanDB);
|
||||
await this.sendPersonalEmotes(userDB);
|
||||
|
||||
//Tattoo hashed IP address to user account for seven days
|
||||
await userDB.tattooIPRecord(socket.handshake.address);
|
||||
}
|
||||
|
||||
socketCrawl(cb){
|
||||
//Crawl through user's sockets (lol)
|
||||
this.sockets.forEach((sockid) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue