Skip to content

Discord alert: Allow public_ ip and port overrides#1787

Closed
robobenklein wants to merge 1 commit intoGameServerManagers:developfrom
robobenklein:develop
Closed

Discord alert: Allow public_ ip and port overrides#1787
robobenklein wants to merge 1 commit intoGameServerManagers:developfrom
robobenklein:develop

Conversation

@robobenklein
Copy link
Copy Markdown

@UltimateByte
Copy link
Copy Markdown
Contributor

Good idea, but it won't work if public IP is an IPv6, as it currently occurs when ipv6 is available.

@robobenklein
Copy link
Copy Markdown
Author

@UltimateByte Can you explain further? Perhaps give an example?

This doesn't introduce any new bugs as far as I'm aware, it just gives another option for resolving a case in which the IP field of the notification is wrong.

@UltimateByte
Copy link
Copy Markdown
Contributor

Quick example :

root@gaben:~# public_ip="10:AB:24"; ip="127.0.0.1"; value="${public_ip:-ip}"; echo "$value"
10:AB:24

Well in my case ( https://hastebin.com/osefopepay ) it would try to query the game server on ipv6, which isn't supported.

I'm not saying your code is bad, but in order to not introduce a bug, you would need to check if the public IP is an IPv6 or not.

Since I don't think any game server supports IPv6, or at least not many as of now, the best solution would be to correct the IP checking system to show only public IPv4.

@robobenklein
Copy link
Copy Markdown
Author

This change only modifies the IP given through a Discord notification, it doesn't change anything about how LGSM queries a server or binds to an IP. You could set this $public_ip to literally anything you want and it wouldn't affect your use case at all unless you were using Discord alerts.

Here the $public_ip is not going to be used in LGSM at all, it's purely for humans to see.

For example, I plan to set mine to something akin to tf2ware.robosane.net which isn't an IP at all. I could even set public_ip="lolsomething that's not an ip" and the only problem would be that the GameTracker.com URL in the Discord notif wouldn't work...

@robobenklein
Copy link
Copy Markdown
Author

Actually @UltimateByte you just helped me realize how confusing this is calling it public_ip. I'm gonna redo the discord notification thing to make it much easier and simpler to configure.

@lock
Copy link
Copy Markdown

lock Bot commented Jan 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Jan 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants