Adam
02-14-2008, 10:32 AM
Question
I have multiple servers set up in my True Update project file. The problem is that I need to know what server was used by the client to get the server files. I want my server script to then download the patch/install file from the correct server.
Answer
1) Go to Client Screens -> Download Server Script -> On Start -> Line 146:
Look for this block of code
-- Break out of this loop if we succeeded
if(screen_globals.GotServerFiles) then
break;
end
Change to this:
-- Break out of this loop if we succeeded
if(screen_globals.GotServerFiles) then
ServerUsed = ServerName;
break;
end
2) Then go to Server Script -> Line 10-15:
if ServerUsed == "Server1" then
-- Server1 was used
g_SourceURL = "http://Server1/patch.exe";
else
-- Server2 was used
g_SourceURL = "http://Server2/patch.exe";
end
Of course this if statement could be expanded if you have more than 2 servers set up.
I have multiple servers set up in my True Update project file. The problem is that I need to know what server was used by the client to get the server files. I want my server script to then download the patch/install file from the correct server.
Answer
1) Go to Client Screens -> Download Server Script -> On Start -> Line 146:
Look for this block of code
-- Break out of this loop if we succeeded
if(screen_globals.GotServerFiles) then
break;
end
Change to this:
-- Break out of this loop if we succeeded
if(screen_globals.GotServerFiles) then
ServerUsed = ServerName;
break;
end
2) Then go to Server Script -> Line 10-15:
if ServerUsed == "Server1" then
-- Server1 was used
g_SourceURL = "http://Server1/patch.exe";
else
-- Server2 was used
g_SourceURL = "http://Server2/patch.exe";
end
Of course this if statement could be expanded if you have more than 2 servers set up.