Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Hide IP/Port in Config.ini


tickleu
 Share

Recommended Posts

Some people prefer to have there IP not shown by others. Title says all so lets make this quick.
Open up your client in vb6 and go to modClientTcp.

Find:
frmMain.Socket.RemoteHost = Options.IP
      frmMain.Socket.RemotePort = Options.Port

and replace to this:

frmMain.Socket.RemoteHost = IP
    frmMain.Socket.RemotePort = Port

Next go to modConstants and add this anywere:

'Connection Protocol
Public Const IP As String = "127.0.0.1"
Public Const PORT As String = 5555

Next go to modDatabase and search for "Public Sub SaveOptions()"
Delete all these lines of code:

Call PutVar(filename, "Options", "IP", Options.IP)
    Call PutVar(filename, "Options", "Port", Str(Options.PORT))
Options.IP = "127.0.0.1"
        Options.PORT = 7001
Options.IP = GetVar(filename, "Options", "IP")
        Options.PORT = Val(GetVar(filename, "Options", "Port"))

Thats all. Just delete your current config.ini and compile and run.
Link to comment
Share on other sites

It would just be better to put a constant value into Options.IP / Options.Port when you load the options, and to not save it to the ini rather than to create a totally new constant value. :P

At least, imho!

The only edits really needed:
    ' This is in Public Sub LoadOptions()
    Options.IP = "127.0.0.1" ' Change these
    Options.Port = 7001

And to remove the two lines that save the IP / Port to config.ini
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
 Share

×
×
  • Create New...