Add rcon host configuration
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tyler 2020-07-09 23:02:01 -04:00
parent 2fe351b932
commit c037c66fc6
1 changed files with 7 additions and 1 deletions

View File

@ -65,7 +65,13 @@ func main() {
events.On(events.Message, handleCommands)
client = rcon.NewSession("localhost", rconPort, rconPassword)
rconHost := "localhost"
if envHost := os.Getenv("RCON_HOST"); envHost != "" {
rconHost = envHost
}
client = rcon.NewSession(rconHost, rconPort, rconPassword)
client.Debug = debug