| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- package main
- import (
- "encoding/json"
- "net/http"
- )
- func ReadLog(w http.ResponseWriter, r *http.Request) {
- log := MCServer.ReadAllLog()
- jsonData, _ := json.Marshal(log)
- sendJSONResponse(w, string(jsonData))
- }
- func ReadBanIP(w http.ResponseWriter, r *http.Request) {
- config := Config.ReadAllBannedIPs()
- jsonData, _ := json.Marshal(config)
- sendJSONResponse(w, string(jsonData))
- }
- func ReadBanPlayer(w http.ResponseWriter, r *http.Request) {
- config := Config.ReadAllBannedPlayers()
- jsonData, _ := json.Marshal(config)
- sendJSONResponse(w, string(jsonData))
- }
- func ReadEULA(w http.ResponseWriter, r *http.Request) {
- config := Config.ReadEULA()
- jsonData, _ := json.Marshal(config)
- sendJSONResponse(w, string(jsonData))
- }
- func ReadOps(w http.ResponseWriter, r *http.Request) {
- config := Config.ReadAllOps()
- jsonData, _ := json.Marshal(config)
- sendJSONResponse(w, string(jsonData))
- }
- func ReadProperties(w http.ResponseWriter, r *http.Request) {
- config := Config.ReadAllProperties()
- jsonData, _ := json.Marshal(config)
- sendJSONResponse(w, string(jsonData))
- }
- func ReadWhitelist(w http.ResponseWriter, r *http.Request) {
- config := Config.ReadAllWhitelists()
- jsonData, _ := json.Marshal(config)
- sendJSONResponse(w, string(jsonData))
- }
|