Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

Check ip server


Adrian1428

Question

6 answers to this question

Recommended Posts

!-->
  • 0

/// Server check ip
bool Metin2Server_IsInvalid()
{
	g_isInvalidServer = false;
	if (g_szPublicIP == "192.x.x.x") {
		g_isInvalidServer = true;
		return g_isInvalidServer;
	} else {
		return g_isInvalidServer;
        //debug
        sys_log(0, "Se if the function works.");
	}
}

Try it :)

 

main.cpp under:

static bool g_isInvalidServer = false;
Link to comment
Share on other sites

  • 0

/// Server check ip
bool Metin2Server_IsInvalid()
{
	g_isInvalidServer = false;
	if (g_szPublicIP == "192.x.x.x") {
		g_isInvalidServer = true;
		return g_isInvalidServer;
	} else {
		return g_isInvalidServer;
        //debug
        sys_log(0, "Se if the function works.");
	}
}

Try it :)

 

main.cpp under:

static bool g_isInvalidServer = false;

doesnt work

Link to comment
Share on other sites

  • 0

You changed this line?

if (g_szPublicIP == "192.x.x.x") {
Sorry for dumb question but sometimes human makes stupid mistakes :D

@Edit

Moreover, you called somewhere this function?

 

Of course I changed there ip and the auth is close after trying to login.

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


  • Activity

    1. 992

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    2. 3

      Biologist Manager (C++ & LUA)

    3. 3

      Visual studio 2022 compiling issue

    4. 63

      Metin2 | Mount System Renewal

    5. 58

      Metin2 2004 Beta Client

    6. 0

      🔥Paradise2 PVP SERVER GLOBAL!! EN-ES-PT 🕐📢Apertura 11 de diciembre 21 horas de España!

    7. 0

      Please help here ( Sush system problem )

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.