InGame Info XML

InGame Info XML

22M Downloads

Add subdomain tag?

Kzitold opened this issue ยท 9 comments

commented

Any way to add a "server subdomain" tag? Like show the address used for that session to connect to the current server.

commented

It's too much effort trying to get the original server address and any bypass would unnecessarily slow down the tag execution.

The recommended way of doing this is the one I already suggested as an alternative:

<operation>
  <var>server</var>
  <str>eq</str>

  <str>server-host-or-ip-1</str>
  <str>my secret server</str>

  <str>server-host-or-ip-2</str>
  <str>my public server</str>

  <!-- repeat as many times as you want -->

  <var>server</var> <!-- show the server host/ip by default -->
</operation>
commented

The client never knows what (sub) server you are connected to, making this impossible.

commented

The thing is I'm getting the "node###.minecraft.toomanynodes.com" thing for my personal server. I'm using MCProHosting to host it.
Might the problem just be the fact it's not a dedicated server and the root address overriding what I put for the "name.mcph.co"

commented

I mean have it grab from the "Server Address" box in the "Edit Server Info" screen (or wherever the server saving feature keep that stuff.) The client should know the address used itself to get on the server.

commented

That's exactly what the server tags do. However, what you refer to as a sub-server is invisible to the client. The server simply redirects traffic from one sub-server to the other sub-server when you switch between them. As far as the client is concerned you're only ever to connected to one, main server.

commented

That's a different issue than what you previously described. The issue is that right now it grabs the server IP from the connection itself because there is no other reference to the original server address in the connection context. One way to solve this would be to properly set up reverse DNS to point to your domain.

I'll check if there is any way to grab the saved server address, however I can't guarantee anything. I know that when I was implementing these tags it took me a lot of work to even find the currently displayed name/address/IP.

commented

In the meantime, is there a way to <if> (or something like that) with an output containing non-numbers? Like "if xxx.xx####.xx#x than output cu$+0m 0u+pu+"

commented

There is nothing that lets you test regex/wildcard text, but you can use if/equal or operation to do an exact compare.

<operation>
  <var>server</var>
  <str>eq</str>

  <str>xxx.xx####.xx#x</str>
  <str>cu$+0m 0u+pu+</str>

  <str>xxx.xx####.xx#x2</str>
  <str>cu$+0m 0u+pu+ 2</str>

  <!-- ... -->

  <var>server</var> <!-- default -->
</operation>
commented

If it lets me replace specifically defined server addresses with a custom name, than it's exactly what I need.

Would also help YouTubers automatically obscure private servers for their videos, so that's a plus with this.