Update clan.go

This commit is contained in:
Alicia 2019-02-25 20:57:06 +00:00
parent 1dabbe6b8c
commit 303b248408

View File

@ -92,7 +92,6 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
md.Err(err) md.Err(err)
return Err500 return Err500
} }
defer rows.Close() defer rows.Close()
for rows.Next() { for rows.Next() {
nc := clanLbSingle{} nc := clanLbSingle{}
@ -110,9 +109,12 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
} }
r.ResponseBase.Code = 200 r.ResponseBase.Code = 200
// anyone who ever looks into this, yes, i need to kill myself. ~Flame // anyone who ever looks into this, yes, i need to kill myself. ~Flame
m := strconv.ParseInt(string(md.Query("m")[19]), 10, 64) m, brr := strconv.ParseInt(string(md.Query("m")[19]), 10, 64)
if brr != nil {
fmt.Println(brr)
m = 0
}
n := "std" n := "std"
if m == 1 { if m == 1 {
n = "taiko" n = "taiko"
@ -143,10 +145,14 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
INNER JOIN users INNER JOIN users
ON users.id = uc.user ON users.id = uc.user
INNER JOIN users_stats ON users_stats.id = uc.user INNER JOIN users_stats ON users_stats.id = uc.user
WHERE clan = ? AND privileges >= 3 WHERE clan = ? AND privileges > 2
`, rid) `, rid)
members.Code = 200 if err != nil {
fmt.Println(err)
}
members.Code = 200
if n == "std" { if n == "std" {
for u := 0; u < len(members.Members); u++ { for u := 0; u < len(members.Members); u++ {