Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2014, 09:32 PM
vishnu
Sarnak
 
Join Date: Oct 2009
Posts: 35
Default Multiple Remote Zone Server Fix

I'm using zone servers not on the same host as the other servers and it would always handout the IP address of where the world server is running. This fix will allow you use remote zone servers in conjunction with a local zone server. Just be sure to change your <tcp ip="xxx.xxx.xxx.xxx" line inside the eqemu_config.xml file on the remote zone server to point to the IP of the worldserver. This code should take care of the rest.

original ./world/client.cpp
Code:
if (!zs_addr[0]) {
	if (cle->IsLocalClient()) {
		struct in_addr in;
		in.s_addr = zs->GetIP();
		zs_addr=inet_ntoa(in);
		if (!strcmp(zs_addr,"127.0.0.1"))
			zs_addr=WorldConfig::get()->LocalAddress.c_str();
	} else {
		zs_addr=WorldConfig::get()->WorldAddress.c_str();
	}
}
replace it with:
Code:
if (!zs_addr[0]) {
	if (cle->IsLocalClient()) {
		struct in_addr in;
		in.s_addr = zs->GetIP();
		zs_addr=inet_ntoa(in);
		if (!strcmp(zs_addr,"127.0.0.1"))
			zs_addr=WorldConfig::get()->LocalAddress.c_str();
	} else {
		//zs_addr=WorldConfig::get()->WorldAddress.c_str();
		struct in_addr in;
		in.s_addr = zs->GetIP();
		zs_addr=inet_ntoa(in);
	}
}
Reply With Quote
  #2  
Old 04-15-2014, 11:31 PM
vishnu
Sarnak
 
Join Date: Oct 2009
Posts: 35
Default

update:
Code:
if (!zs_addr[0]) {
	if (cle->IsLocalClient()) {
		struct in_addr in;
		in.s_addr = zs->GetIP();
		zs_addr=inet_ntoa(in);
		if (!strcmp(zs_addr,"127.0.0.1"))
			zs_addr=WorldConfig::get()->LocalAddress.c_str();
	} else {
		//zs_addr=WorldConfig::get()->WorldAddress.c_str();
		struct in_addr in;
		in.s_addr = zs->GetIP();
		zs_addr=inet_ntoa(in);
                if (!strcmp(zs_addr,"127.0.0.1"))
			zs_addr=WorldConfig::get()->WorldAddress.c_str();
	}
}
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:18 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3