1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-04 11:44:00 +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. // Close the connection when we're done.
defer closer() defer closer()
var report logstasher.ConnectionReport
report.ConnectTime = time.Now()
report.RemoteAddr = conn.RemoteAddr()
_clientChan := make(chan ClientMessage) _clientChan := make(chan ClientMessage)
_serverMessageChan := make(chan ClientMessage, sendMessageBufferLength) _serverMessageChan := make(chan ClientMessage, sendMessageBufferLength)
_errorChan := make(chan error) _errorChan := make(chan error)
@ -279,6 +275,10 @@ func RunSocketConnection(conn *websocket.Conn) {
client.RemoteAddr = conn.RemoteAddr() client.RemoteAddr = conn.RemoteAddr()
client.MsgChannelIsDone = stoppedChan client.MsgChannelIsDone = stoppedChan
var report logstasher.ConnectionReport
report.ConnectTime = time.Now()
report.RemoteAddr = client.RemoteAddr
conn.SetPongHandler(func(pongBody string) error { conn.SetPongHandler(func(pongBody string) error {
client.Mutex.Lock() client.Mutex.Lock()
client.pingCount = 0 client.pingCount = 0
@ -318,6 +318,8 @@ func RunSocketConnection(conn *websocket.Conn) {
atomic.AddUint64(&Statistics.CurrentClientCount, NegativeOne) atomic.AddUint64(&Statistics.CurrentClientCount, NegativeOne)
} }
report.UsernameWasValidated = client.UsernameValidated
report.TwitchUsername = client.TwitchUsername
logstasher.Submit(&report) logstasher.Submit(&report)
} }

View file

@ -113,7 +113,10 @@ type ConnectionReport struct {
DisconnectCode int DisconnectCode int
DisconnectReason string 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(). // FillReport sets all the calculated fields, and calls esReportBasic.FillReport().