|
@@ -14,7 +14,7 @@ func AddBanIP(w http.ResponseWriter, r *http.Request) {
|
|
|
Expires := "forever"
|
|
|
Reason, _ := mv(r, "reason", false)
|
|
|
Config.WriteBannedIP(IP, Created, Source, Expires, Reason)
|
|
|
- sendJSONResponse(w, "OK")
|
|
|
+ sendTextResponse(w, "OK")
|
|
|
}
|
|
|
|
|
|
func AddBanPlayer(w http.ResponseWriter, r *http.Request) {
|
|
@@ -26,9 +26,9 @@ func AddBanPlayer(w http.ResponseWriter, r *http.Request) {
|
|
|
Reason, _ := mv(r, "reason", false)
|
|
|
if IsValidUUID(UUID) {
|
|
|
Config.WriteBannedPlayer(UUID, Name, Created, Source, Expires, Reason)
|
|
|
- sendJSONResponse(w, "OK")
|
|
|
+ sendTextResponse(w, "OK")
|
|
|
} else {
|
|
|
- sendJSONResponse(w, "Incorrect UUID.")
|
|
|
+ sendTextResponse(w, "Incorrect UUID.")
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -42,9 +42,9 @@ func AddOps(w http.ResponseWriter, r *http.Request) {
|
|
|
BypassesPlayerLimitB, _ := strconv.ParseBool(BypassesPlayerLimit)
|
|
|
if IsValidUUID(UUID) {
|
|
|
Config.WriteOps(UUID, Name, LevelI, BypassesPlayerLimitB)
|
|
|
- sendJSONResponse(w, "OK")
|
|
|
+ sendTextResponse(w, "OK")
|
|
|
} else {
|
|
|
- sendJSONResponse(w, "Incorrect UUID.")
|
|
|
+ sendTextResponse(w, "Incorrect UUID.")
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -53,9 +53,9 @@ func AddWhitelist(w http.ResponseWriter, r *http.Request) {
|
|
|
Name, _ := mv(r, "name", false)
|
|
|
if IsValidUUID(UUID) {
|
|
|
Config.WriteWhitelist(UUID, Name)
|
|
|
- sendJSONResponse(w, "OK")
|
|
|
+ sendTextResponse(w, "OK")
|
|
|
} else {
|
|
|
- sendJSONResponse(w, "Incorrect UUID.")
|
|
|
+ sendTextResponse(w, "Incorrect UUID.")
|
|
|
}
|
|
|
}
|
|
|
|