1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00

Don't send IPs and usernames until I know how to delete them

This commit is contained in:
Kane York 2015-12-16 14:19:23 -08:00
parent c0500457a6
commit b236c34c94
2 changed files with 10 additions and 5 deletions

View file

@ -265,10 +265,6 @@ func RunSocketConnection(conn *websocket.Conn) {
// Close the connection when we're done.
defer closer()
var report logstasher.ConnectionReport
report.ConnectTime = time.Now()
report.RemoteAddr = conn.RemoteAddr()
_clientChan := make(chan ClientMessage)
_serverMessageChan := make(chan ClientMessage, sendMessageBufferLength)
_errorChan := make(chan error)
@ -279,6 +275,10 @@ func RunSocketConnection(conn *websocket.Conn) {
client.RemoteAddr = conn.RemoteAddr()
client.MsgChannelIsDone = stoppedChan
var report logstasher.ConnectionReport
report.ConnectTime = time.Now()
report.RemoteAddr = client.RemoteAddr
conn.SetPongHandler(func(pongBody string) error {
client.Mutex.Lock()
client.pingCount = 0
@ -318,6 +318,8 @@ func RunSocketConnection(conn *websocket.Conn) {
atomic.AddUint64(&Statistics.CurrentClientCount, NegativeOne)
}
report.UsernameWasValidated = client.UsernameValidated
report.TwitchUsername = client.TwitchUsername
logstasher.Submit(&report)
}

View file

@ -113,7 +113,10 @@ type ConnectionReport struct {
DisconnectCode int
DisconnectReason string
RemoteAddr net.Addr
UsernameWasValidated bool
RemoteAddr net.Addr `json:"-"` // not transmitted until I can figure out data minimization
TwitchUsername string `json:"-"` // also not transmitted
}
// FillReport sets all the calculated fields, and calls esReportBasic.FillReport().