Jump to content

krazos

Recommended Posts

Hi!

 

How can I enable the user to change hostname?

 

For instance NS2. There's no config file, only command-lines. I know I can make a custom variable, for instance ![serverName] and then enable users to change that in commandline manager.

 

But is that the primary solution? is there no other way for the user to change the in-built $[HostName] variable in the commandline?

 

Thanks in advance.

Link to comment
Share on other sites

I'm not quite sure what you're getting at, I know what you're trying to achieve (allow a customer to change hostname) but the rest of your explanation is a tad hazy, feel free to reply or PM me on exactly what you mean.

 

This is the default custom commandline:

 

-name $[HostName] -map ![Map] -ip $[service.IpAddress] -port $[service.GamePort] -limit $[service.Slots]

 

However, you can add custom variables -

bYI7Tg9.png

- to use in a commandline that the user can change by himself/herself in their "Commandline Manager"

CpBUUmU.png

 

I can add a custom variable called "serverName" and use that in the picture above, so the user can change their hostname.

 

However, there are already built-in variables.

jmGtBvx.png

 

I would like to use them instead, so that TCAdmin knows what the hostname of the server is and can show it in:

 

ED48uo7.png

 

How can I add so that the user can change the $[hostname] variable in the custom commandline menu?

Link to comment
Share on other sites

And to clarify, in other games you can just change the hostname in the serverconfig. NS2 doesnt have a serverconfig, everything is just commandline. So this problem is mainly for NS2.

 

Edit:

I found that it is possible to use server config files, this will solve the problem. Ill try it.

Edited by krazos
Link to comment
Share on other sites

I'm aware of how this works (I've wrote tc admin configs) I've always found the tc admin command line manager a bit confusing, but it should be simple enough to add the hostname variable editable by the client by simply creating it as the default command line, and all the client would do would change it in the command line options. If you are still struggling with this (your above fix doesn't work) I'll delve into my tc admin and see if I can do this on my end, and if I figure it out let you know how to do it :')

Link to comment
Share on other sites

Alright. Well, I just found this "Note: The -file option currently does not work with a Linux server."

 

So yeah it would be very kind if you could figure out how to let the user change a default variable in the commandline.

Link to comment
Share on other sites

I think you're overthinking the problem, krazos :)

 

Go to the HostName variable and make sure the following settings has been selected:

- Command line parameter

- User access (and probably also admin and subadmin access)

- Make sure it has got a label

 

Easy peasy lemon squeezy :-)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use