[Guide] Autopatch server explained

09/05/2008 14:00 Rechocto#16
@peopel wanting forms:
This will use the built-in autopatcher that conquer has, but instead of updating with TQ it will update with your server, the console app is the server, not the patcher.

however, I do agree that a more elaborated guide would be nice, and a complete server script for the console app instead of an example of using sockets would be sweet aswell, I'd give *thanks for that :p ;)
09/05/2008 14:06 MushyPeas#17
Quote:
Originally Posted by Rechocto View Post
@peopel wanting forms:
This will use the built-in autopatcher that conquer has, but instead of updating with TQ it will update with your server, the console app is the server, not the patcher.

however, I do agree that a more elaborated guide would be nice, and a complete server script for the console app instead of an example of using sockets would be sweet aswell, I'd give *thanks for that :p ;)
All people here want is ready made stuff xD
I even made it in C# which I never code in just because it's what most people here "know", so there's nothing stopping them from putting in a little effort.
I'm trying to force 'em to stop being lazy and actually learn something :p
That's worth more to me than whether or not I get people to click a "Thanks" button.
09/05/2008 14:12 Rechocto#18
@mushy - I know what you mean, A lot of the premade code you cant tell is reposted by how it's written.. one example I posted earlier this week was something like
if(blahblah==1)
{
somefunction(blah blah 'a');
sendpacket('something);
action=100;
}
else if (blahblah==2)
{
somefunction(blah blah 'b')
sendpacket('something);
action=100;
}

and so on and i was like "you need to fix this:
string c = null;
switch(blahblah) {
case 1: c = 'a'; break;
case 2: c = 'b'; break;
//---
}
somefunction(blah blah + c)
sendpacket('something);
action=100;
"


but still, I do have a question on your guide:

Quote:
Client: 5056
Server: UPDATE 64.151.87.40 enzf/5057.exe
it will automatically goto [Only registered and activated users can see links. Click Here To Register...], or ?
09/05/2008 14:17 MushyPeas#19
Quote:
Originally Posted by Rechocto View Post
I do have a question on your guide:

Quote:
Client: 5056
Server: UPDATE 64.151.87.40 enzf/5057.exe
it will automatically goto [Only registered and activated users can see links. Click Here To Register...], or ?
That response from the server will get CO's Autopatcher to kick in, download the file from [Only registered and activated users can see links. Click Here To Register...] in this case and execute it upon downloading, then starting the conquer game.

Aka it does the exact same the normal autopatch would do, we just supply it with a different download server.

Hope that answered your question.
09/05/2008 14:20 Rechocto#20
k, thanks, just making sure if i tell it to goto an exefile it wont goto co.91.com/enzf/5057.exe (in this case)
09/05/2008 15:29 YukiXian#21
@ MushyPeas,

Could you better explain that ports? How people will be able to connect to the AutoPatcher, while the port is different?
09/05/2008 15:57 MushyPeas#22
Quote:
Originally Posted by YukiXian View Post
@ MushyPeas,

Could you better explain that ports? How people will be able to connect to the AutoPatcher, while the port is different?
Updated first post to be more elaborate on editing ip and ports in the config files, read that.
09/05/2008 17:20 Rechocto#23
so...... since Im new to C#.. in VB it would be..

dim s as string
ws.getdata(s)
if s < curver then ws.senddata (s+1) & vbcrlf else: ws.senddata "READY"& vbcrlf
ws.senddata vbcrlf


but, how would I do that with C#?
09/05/2008 17:37 YukiXian#24
lol What port you recommer to use, and how people will be able to AutoPatch them?

So I'm using Hamachi, I have to edit the IP to my Hamachi IP, and the patch, Is like this? site/Patch/patch01.exe?
09/05/2008 19:04 Rechocto#25
So I telnetted into 69.59.148.97 on port 9528, and it does indeed use "UPDATE <ip> <folder>/<file>" and "READY", but whenever I send "READY" back to the client, it asks if I want to retry bypass or manual patch... any suggestions?
09/05/2008 20:43 MushyPeas#26
Quote:
Originally Posted by Rechocto View Post
so...... since Im new to C#.. in VB it would be..

dim s as string
ws.getdata(s)
if s < curver then ws.senddata (s+1) & vbcrlf else: ws.senddata "READY"& vbcrlf
ws.senddata vbcrlf


but, how would I do that with C#?
Have you tried it without the carriage return / line feeds?
Because those were not used in the original packets.

Quote:
Originally Posted by YukiXian View Post
lol What port you recommer to use, and how people will be able to AutoPatch them?

So I'm using Hamachi, I have to edit the IP to my Hamachi IP, and the patch, Is like this? site/Patch/patch01.exe?
Use any port you want as long as you're not using it for something else.. it really doesn't matter.
09/05/2008 21:52 nTL3fTy#27
Quote:
Originally Posted by MushyPeas View Post
That response from the server will get CO's Autopatcher to kick in, download the file from [Only registered and activated users can see links. Click Here To Register...] in this case and execute it upon downloading, then starting the conquer game.

Aka it does the exact same the normal autopatch would do, we just supply it with a different download server.

Hope that answered your question.
Actually, I think it's supposed to be an FTP server.
Code:
Successfully connected to: 121.207.249.53:9528
Sent client version (4351)
Received packet: UPDATE 69.59.146.124 enzf/4352-4358.exe
ftp://69.59.146.124/enzf/

#edit
Looks like it can fail too...
Code:
Successfully connected to: 121.207.249.53:9528
Sent client version (4000)
Received packet: FAIL
Code:
Successfully connected to: 69.59.148.97:9528
Sent client version (5061)
Received packet: FAIL
09/05/2008 22:59 MushyPeas#28
Quote:
Originally Posted by nTL3fTy View Post
Actually, I think it's supposed to be an FTP server.
Code:
Successfully connected to: 121.207.249.53:9528
Sent client version (4351)
Received packet: UPDATE 69.59.146.124 enzf/4352-4358.exe
ftp://69.59.146.124/enzf/

#edit
Looks like it can fail too...
Code:
Successfully connected to: 121.207.249.53:9528
Sent client version (4000)
Received packet: FAIL
I'm not 100% sure but I believe it can be either one, since I don't even run an ftp server and it worked fine (unless apache comes with an ftp serv too? :x), I believe the autopatcher tries both.

And yea I know it can "FAIL" but I don't really see why it would be needed, since you either update or you don't.
09/06/2008 00:45 nTL3fTy#29
Quote:
Originally Posted by MushyPeas View Post
I'm not 100% sure but I believe it can be either one, since I don't even run an ftp server and it worked fine (unless apache comes with an ftp serv too? :x), I believe the autopatcher tries both.

And yea I know it can "FAIL" but I don't really see why it would be needed, since you either update or you don't.
Maybe, but it seems like TQ's autopatch server only responds with an FTP server:
[Only registered and activated users can see links. Click Here To Register...] doesn't work.
09/06/2008 01:11 MushyPeas#30
Quote:
Originally Posted by nTL3fTy View Post
Maybe, but it seems like TQ's autopatch server only responds with an FTP server:
[Only registered and activated users can see links. Click Here To Register...] doesn't work.
Well yea but thats because it's an ftp server, the autopatcher can't change an ftp server into a http server either :p but it can work with either one as far as I know.