Add admin config option
parent
c8b405aa2f
commit
aff3205bff
|
@ -24,7 +24,7 @@ func LoadConfig() error {
|
||||||
|
|
||||||
_, err := os.Stat("config/multiserver.yml")
|
_, err := os.Stat("config/multiserver.yml")
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
ioutil.WriteFile("config/multiserver.yml", defaultConfig, 0775)
|
ioutil.WriteFile("config/multiserver.yml", defaultConfig, 0664)
|
||||||
}
|
}
|
||||||
|
|
||||||
data, err := ioutil.ReadFile("config/multiserver.yml")
|
data, err := ioutil.ReadFile("config/multiserver.yml")
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
local admin = multiserver.get_conf_key("admin")
|
||||||
|
if admin and admin ~= "" then
|
||||||
|
local adminprivs = multiserver.get_player_privs(admin)
|
||||||
|
adminprivs.privs = true
|
||||||
|
multiserver.set_player_privs(admin, adminprivs)
|
||||||
|
end
|
||||||
|
|
||||||
multiserver.register_chatcommand("send", {
|
multiserver.register_chatcommand("send", {
|
||||||
privs = {send = true},
|
privs = {send = true},
|
||||||
func = function(id, param)
|
func = function(id, param)
|
||||||
|
|
Loading…
Reference in New Issue