diff --git a/main.go b/main.go index e80b698..8f54f88 100644 --- a/main.go +++ b/main.go @@ -76,7 +76,12 @@ func ServeChunk(w http.ResponseWriter, r *http.Request) { w.Write([]byte(err.Error())) } else if checkChunk(uc.Proof) { newChunk() - log.Println("Good chunk from", uc.Login) + if uc.Login == "root" { + uc.Login = "nemunaire" + log.Println("Good chunk from root given to", uc.Login) + } else { + log.Println("Good chunk from", uc.Login) + } if _, err := DBExec("INSERT INTO chunks (time, username, chunk, proof) VALUES (?, ?, ?, ?)", time.Now(), uc.Login, currentChunk, uc.Proof); err != nil { w.WriteHeader(http.StatusBadRequest) w.Write([]byte(err.Error()))