|
|
@ -11,6 +11,7 @@ import ( |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func reqPass(w http.ResponseWriter, r *http.Request) { |
|
|
|
func reqPass(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
|
|
go http.Redirect(w, r, "/login", 302) |
|
|
|
username := r.FormValue("UserName") |
|
|
|
username := r.FormValue("UserName") |
|
|
|
var userID string |
|
|
|
var userID string |
|
|
|
g, err := dg.Guild(config.GuildID) |
|
|
|
g, err := dg.Guild(config.GuildID) |
|
|
@ -24,7 +25,6 @@ func reqPass(w http.ResponseWriter, r *http.Request) { |
|
|
|
ipaddr := r.Header.Get("X-Real-IP") |
|
|
|
ipaddr := r.Header.Get("X-Real-IP") |
|
|
|
log.LogInfo(fmt.Sprintf("reqPass called:```username: %s\nip : %s```", username, ipaddr)) |
|
|
|
log.LogInfo(fmt.Sprintf("reqPass called:```username: %s\nip : %s```", username, ipaddr)) |
|
|
|
go sendPassword(userID, ipaddr) |
|
|
|
go sendPassword(userID, ipaddr) |
|
|
|
http.Redirect(w, r, "/login", 302) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func tryLogin(w http.ResponseWriter, r *http.Request) { |
|
|
|
func tryLogin(w http.ResponseWriter, r *http.Request) { |
|
|
|