Add rcon host configuration
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2fe351b932
commit
c037c66fc6
8
main.go
8
main.go
@ -65,7 +65,13 @@ func main() {
|
|||||||
|
|
||||||
events.On(events.Message, handleCommands)
|
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
|
client.Debug = debug
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user