diff --git a/auth.go b/auth.go index 7d7c731..dda86eb 100644 --- a/auth.go +++ b/auth.go @@ -75,8 +75,8 @@ func tryLogin(w http.ResponseWriter, r *http.Request) { func usePassword(user string, pass string, ip string) bool { defer log.PanicSafe() log.LogInfo("%+v", toks) - tok := toks[user] - delete(toks, user) + tok := toks[strings.ToUpper(user)] + delete(toks, strings.ToUpper(user)) if tok.IP != ip { log.LogWarn(fmt.Sprintf("%s attempted to use an improper IP.", user)) return false @@ -114,7 +114,7 @@ func sendPassword(user string, ipaddr string) { log.LogErrorType(err) } now := time.Now() - toks[m.Nick] = Tokens{ + toks[strings.ToUpper(m.Nick)] = Tokens{ Username: user, IP: ipaddr, Password: str,