home *** CD-ROM | disk | FTP | other *** search
Unknown | 2004-05-10 | 6.2 KB |
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 60 62 2f 2f 3d 3d 3d 3d |........|`b//====|
|00000010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000020| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000050| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0d 0a 2f 2f 20 55 64 |========|=..// Ud|
|00000060| 70 47 61 6d 65 53 70 79 | 55 70 6c 69 6e 6b 0d 0a |pGameSpy|Uplink..|
|00000070| 2f 2f 0d 0a 2f 2f 20 56 | 65 72 73 69 6f 6e 3a 20 |//..// V|ersion: |
|00000080| 31 2e 33 0d 0a 2f 2f 0d | 0a 2f 2f 20 54 68 69 73 |1.3..//.|.// This|
|00000090| 20 75 70 6c 69 6e 6b 20 | 69 73 20 63 6f 6d 70 6c | uplink |is compl|
|000000a0| 69 61 6e 74 20 77 69 74 | 68 20 74 68 65 20 47 61 |iant wit|h the Ga|
|000000b0| 6d 65 53 70 79 20 55 70 | 6c 69 6e 6b 20 53 70 65 |meSpy Up|link Spe|
|000000c0| 63 69 66 69 63 61 74 69 | 6f 6e 2e 0d 0a 2f 2f 20 |cificati|on...// |
|000000d0| 54 68 65 20 73 70 65 63 | 69 66 69 63 61 74 69 6f |The spec|ificatio|
|000000e0| 6e 20 69 73 20 61 76 61 | 69 6c 61 62 6c 65 20 61 |n is ava|ilable a|
|000000f0| 74 20 68 74 74 70 3a 2f | 2f 77 77 77 2e 67 61 6d |t http:/|/www.gam|
|00000100| 65 73 70 79 2e 63 6f 6d | 2f 64 65 76 65 6c 6f 70 |espy.com|/develop|
|00000110| 65 72 0d 0a 2f 2f 20 61 | 6e 64 20 6d 69 67 68 74 |er..// a|nd might|
|00000120| 20 62 65 20 6f 66 20 75 | 73 65 20 74 6f 20 70 72 | be of u|se to pr|
|00000130| 6f 67 61 6d 6d 65 72 73 | 20 77 68 6f 20 77 61 6e |ogammers| who wan|
|00000140| 74 20 74 6f 20 61 64 61 | 70 74 20 74 68 65 69 72 |t to ada|pt their|
|00000150| 20 6f 77 6e 0d 0a 2f 2f | 20 73 65 72 76 65 72 20 | own..//| server |
|00000160| 75 70 6c 69 6e 6b 73 2e | 0d 0a 2f 2f 0d 0a 2f 2f |uplinks.|..//..//|
|00000170| 20 55 64 70 47 61 6d 65 | 53 70 79 55 70 6c 69 6e | UdpGame|SpyUplin|
|00000180| 6b 20 73 65 6e 64 73 20 | 61 20 68 65 61 72 74 62 |k sends |a heartb|
|00000190| 65 61 74 20 74 6f 20 74 | 68 65 20 73 70 65 63 69 |eat to t|he speci|
|000001a0| 66 69 65 64 20 6d 61 73 | 74 65 72 20 73 65 72 76 |fied mas|ter serv|
|000001b0| 65 72 0d 0a 2f 2f 20 65 | 76 65 72 79 20 66 69 76 |er..// e|very fiv|
|000001c0| 65 20 6d 69 6e 75 74 65 | 73 2e 20 20 54 68 65 20 |e minute|s. The |
|000001d0| 68 65 61 72 74 62 65 61 | 74 20 69 73 20 69 6e 20 |heartbea|t is in |
|000001e0| 74 68 65 20 66 6f 72 6d | 3a 0d 0a 2f 2f 20 20 20 |the form|:..// |
|000001f0| 20 5c 68 65 61 72 74 62 | 65 61 74 5c 51 75 65 72 | \heartb|eat\Quer|
|00000200| 79 50 6f 72 74 5c 67 61 | 6d 65 6e 61 6d 65 5c 75 |yPort\ga|mename\u|
|00000210| 6e 72 65 61 6c 0d 0a 2f | 2f 0d 0a 2f 2f 20 46 75 |nreal../|/..// Fu|
|00000220| 6c 6c 20 64 6f 63 75 6d | 65 6e 74 61 74 69 6f 6e |ll docum|entation|
|00000230| 20 6f 6e 20 74 68 69 73 | 20 63 6c 61 73 73 20 69 | on this| class i|
|00000240| 73 20 61 76 61 69 6c 61 | 62 6c 65 20 61 74 20 68 |s availa|ble at h|
|00000250| 74 74 70 3a 2f 2f 75 6e | 72 65 61 6c 2e 65 70 69 |ttp://un|real.epi|
|00000260| 63 67 61 6d 65 73 2e 63 | 6f 6d 2f 0d 0a 2f 2f 0d |cgames.c|om/..//.|
|00000270| 0a 2f 2f 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.//=====|========|
|00000280| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000290| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000002a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000002b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000002c0| 0d 0a 63 6c 61 73 73 20 | 55 64 70 47 61 6d 65 53 |..class |UdpGameS|
|000002d0| 70 79 55 70 6c 69 6e 6b | 20 65 78 74 65 6e 64 73 |pyUplink| extends|
|000002e0| 20 55 64 70 4c 69 6e 6b | 20 63 6f 6e 66 69 67 3b | UdpLink| config;|
|000002f0| 0d 0a 0d 0a 2f 2f 20 4d | 61 73 74 65 72 20 55 70 |....// M|aster Up|
|00000300| 6c 69 6e 6b 20 43 6f 6e | 66 69 67 2e 0d 0a 76 61 |link Con|fig...va|
|00000310| 72 28 29 20 63 6f 6e 66 | 69 67 20 69 6e 74 09 09 |r() conf|ig int..|
|00000320| 55 70 64 61 74 65 4d 69 | 6e 75 74 65 73 3b 09 09 |UpdateMi|nutes;..|
|00000330| 09 2f 2f 20 50 65 72 69 | 6f 64 20 6f 66 20 75 70 |.// Peri|od of up|
|00000340| 64 61 74 65 20 28 69 6e | 20 6d 69 6e 75 74 65 73 |date (in| minutes|
|00000350| 29 0d 0a 76 61 72 28 29 | 20 73 74 72 69 6e 67 09 |)..var()| string.|
|00000360| 09 09 4d 61 73 74 65 72 | 53 65 72 76 65 72 41 64 |..Master|ServerAd|
|00000370| 64 72 65 73 73 3b 09 2f | 2f 20 41 64 64 72 65 73 |dress;./|/ Addres|
|00000380| 73 20 6f 66 20 74 68 65 | 20 6d 61 73 74 65 72 20 |s of the| master |
|00000390| 73 65 72 76 65 72 0d 0a | 76 61 72 28 29 20 63 6f |server..|var() co|
|000003a0| 6e 66 69 67 20 69 6e 74 | 09 09 4d 61 73 74 65 72 |nfig int|..Master|
|000003b0| 53 65 72 76 65 72 50 6f | 72 74 3b 09 09 2f 2f 20 |ServerPo|rt;..// |
|000003c0| 4f 70 74 69 6f 6e 61 6c | 20 70 6f 72 74 20 74 68 |Optional| port th|
|000003d0| 61 74 20 74 68 65 20 6d | 61 73 74 65 72 20 73 65 |at the m|aster se|
|000003e0| 72 76 65 72 20 69 73 20 | 6c 69 73 74 65 6e 69 6e |rver is |listenin|
|000003f0| 67 20 6f 6e 0d 0a 76 61 | 72 28 29 20 63 6f 6e 66 |g on..va|r() conf|
|00000400| 69 67 20 69 6e 74 20 09 | 09 53 65 72 76 65 72 52 |ig int .|.ServerR|
|00000410| 65 67 69 6f 6e 3b 09 09 | 09 2f 2f 20 52 65 67 69 |egion;..|.// Regi|
|00000420| 6f 6e 20 6f 66 20 74 68 | 65 20 67 61 6d 65 20 73 |on of th|e game s|
|00000430| 65 72 76 65 72 0d 0a 0d | 0a 0d 0a 76 61 72 28 29 |erver...|...var()|
|00000440| 20 6e 61 6d 65 09 09 09 | 09 54 61 72 67 65 74 51 | name...|.TargetQ|
|00000450| 75 65 72 79 4e 61 6d 65 | 3b 09 09 2f 2f 20 4e 61 |ueryName|;..// Na|
|00000460| 6d 65 20 6f 66 20 74 68 | 65 20 71 75 65 72 79 20 |me of th|e query |
|00000470| 73 65 72 76 65 72 20 6f | 62 6a 65 63 74 20 74 6f |server o|bject to|
|00000480| 20 75 73 65 2e 0d 0a 76 | 61 72 20 49 70 41 64 64 | use...v|ar IpAdd|
|00000490| 72 09 09 09 09 4d 61 73 | 74 65 72 53 65 72 76 65 |r....Mas|terServe|
|000004a0| 72 49 70 41 64 64 72 3b | 09 09 2f 2f 20 4d 61 73 |rIpAddr;|..// Mas|
|000004b0| 74 65 72 20 73 65 72 76 | 65 72 27 73 20 61 64 64 |ter serv|er's add|
|000004c0| 72 65 73 73 2e 0d 0a 76 | 61 72 20 73 74 72 69 6e |ress...v|ar strin|
|000004d0| 67 09 09 20 20 20 20 20 | 20 20 20 48 65 61 72 74 |g.. | Heart|
|000004e0| 62 65 61 74 4d 65 73 73 | 61 67 65 3b 09 09 2f 2f |beatMess|age;..//|
|000004f0| 20 54 68 65 20 6d 65 73 | 73 61 67 65 20 74 68 61 | The mes|sage tha|
|00000500| 74 20 69 73 20 73 65 6e | 74 20 74 6f 20 74 68 65 |t is sen|t to the|
|00000510| 20 6d 61 73 74 65 72 20 | 73 65 72 76 65 72 2e 0d | master |server..|
|00000520| 0a 76 61 72 20 55 64 70 | 47 61 6d 65 53 70 79 51 |.var Udp|GameSpyQ|
|00000530| 75 65 72 79 09 09 51 75 | 65 72 79 3b 09 09 09 09 |uery..Qu|ery;....|
|00000540| 09 2f 2f 20 54 68 65 20 | 71 75 65 72 79 20 6f 62 |.// The |query ob|
|00000550| 6a 65 63 74 2e 0d 0a 76 | 61 72 20 69 6e 74 09 09 |ject...v|ar int..|
|00000560| 09 09 20 20 20 20 43 75 | 72 72 65 6e 74 51 75 65 |.. Cu|rrentQue|
|00000570| 72 79 4e 75 6d 3b 09 09 | 2f 2f 20 51 75 65 72 79 |ryNum;..|// Query|
|00000580| 20 49 44 20 4e 75 6d 62 | 65 72 2e 0d 0a 0d 0a 2f | ID Numb|er...../|
|00000590| 2f 20 49 6e 69 74 69 61 | 6c 69 7a 65 2e 0d 0a 66 |/ Initia|lize...f|
|000005a0| 75 6e 63 74 69 6f 6e 20 | 50 72 65 42 65 67 69 6e |unction |PreBegin|
|000005b0| 50 6c 61 79 28 29 0d 0a | 7b 0d 0a 09 2f 2f 20 46 |Play()..|{...// F|
|000005c0| 69 6e 64 20 61 20 74 68 | 65 20 73 65 72 76 65 72 |ind a th|e server|
|000005d0| 20 71 75 65 72 79 20 68 | 61 6e 64 6c 65 72 2e 0d | query h|andler..|
|000005e0| 0a 09 66 6f 72 65 61 63 | 68 20 41 6c 6c 41 63 74 |..foreac|h AllAct|
|000005f0| 6f 72 73 28 63 6c 61 73 | 73 27 55 64 70 47 61 6d |ors(clas|s'UdpGam|
|00000600| 65 53 70 79 51 75 65 72 | 79 27 2c 20 51 75 65 72 |eSpyQuer|y', Quer|
|00000610| 79 2c 20 54 61 72 67 65 | 74 51 75 65 72 79 4e 61 |y, Targe|tQueryNa|
|00000620| 6d 65 29 0d 0a 09 09 62 | 72 65 61 6b 3b 0d 0a 0d |me)....b|reak;...|
|00000630| 0a 09 69 66 28 20 51 75 | 65 72 79 3d 3d 4e 6f 6e |..if( Qu|ery==Non|
|00000640| 65 20 29 0d 0a 09 7b 0d | 0a 09 09 4c 6f 67 28 22 |e )...{.|...Log("|
|00000650| 55 64 70 47 61 6d 65 53 | 70 79 55 70 6c 69 6e 6b |UdpGameS|pyUplink|
|00000660| 3a 20 43 6f 75 6c 64 20 | 6e 6f 74 20 66 69 6e 64 |: Could |not find|
|00000670| 20 61 20 55 64 70 47 61 | 6d 65 53 70 79 51 75 65 | a UdpGa|meSpyQue|
|00000680| 72 79 20 6f 62 6a 65 63 | 74 2c 20 61 62 6f 72 74 |ry objec|t, abort|
|00000690| 69 6e 67 2e 22 29 3b 0d | 0a 09 09 72 65 74 75 72 |ing.");.|...retur|
|000006a0| 6e 3b 0d 0a 09 7d 0d 0a | 0d 0a 09 48 65 61 72 74 |n;...}..|...Heart|
|000006b0| 62 65 61 74 4d 65 73 73 | 61 67 65 20 3d 20 22 5c |beatMess|age = "\|
|000006c0| 5c 68 65 61 72 74 62 65 | 61 74 5c 5c 22 24 51 75 |\heartbe|at\\"$Qu|
|000006d0| 65 72 79 2e 50 6f 72 74 | 24 22 5c 5c 67 61 6d 65 |ery.Port|$"\\game|
|000006e0| 6e 61 6d 65 5c 5c 22 24 | 47 61 6d 65 53 70 79 47 |name\\"$|GameSpyG|
|000006f0| 61 6d 65 4e 61 6d 65 28 | 29 3b 0d 0a 0d 0a 09 2f |ameName(|);...../|
|00000700| 2f 20 53 65 74 20 74 68 | 65 20 50 6f 72 74 2e 0d |/ Set th|e Port..|
|00000710| 0a 09 4d 61 73 74 65 72 | 53 65 72 76 65 72 49 70 |..Master|ServerIp|
|00000720| 41 64 64 72 2e 50 6f 72 | 74 20 3d 20 4d 61 73 74 |Addr.Por|t = Mast|
|00000730| 65 72 53 65 72 76 65 72 | 50 6f 72 74 3b 0d 0a 0d |erServer|Port;...|
|00000740| 0a 09 2f 2f 20 52 65 73 | 6f 6c 76 65 20 74 68 65 |..// Res|olve the|
|00000750| 20 41 64 64 72 65 73 73 | 2e 0d 0a 09 69 66 28 20 | Address|....if( |
|00000760| 4d 61 73 74 65 72 53 65 | 72 76 65 72 41 64 64 72 |MasterSe|rverAddr|
|00000770| 65 73 73 3d 3d 22 22 20 | 29 0d 0a 09 09 4d 61 73 |ess=="" |)....Mas|
|00000780| 74 65 72 53 65 72 76 65 | 72 41 64 64 72 65 73 73 |terServe|rAddress|
|00000790| 20 3d 20 22 6d 61 73 74 | 65 72 22 24 53 65 72 76 | = "mast|er"$Serv|
|000007a0| 65 72 52 65 67 69 6f 6e | 24 22 2e 67 61 6d 65 73 |erRegion|$".games|
|000007b0| 70 79 2e 63 6f 6d 22 3b | 0d 0a 09 52 65 73 6f 6c |py.com";|...Resol|
|000007c0| 76 65 28 20 4d 61 73 74 | 65 72 53 65 72 76 65 72 |ve( Mast|erServer|
|000007d0| 41 64 64 72 65 73 73 20 | 29 3b 0d 0a 7d 0d 0a 0d |Address |);..}...|
|000007e0| 0a 2f 2f 20 57 68 65 6e | 20 6d 61 73 74 65 72 20 |.// When| master |
|000007f0| 73 65 72 76 65 72 20 61 | 64 64 72 65 73 73 20 69 |server a|ddress i|
|00000800| 73 20 72 65 73 6f 6c 76 | 65 64 2e 0d 0a 66 75 6e |s resolv|ed...fun|
|00000810| 63 74 69 6f 6e 20 52 65 | 73 6f 6c 76 65 64 28 20 |ction Re|solved( |
|00000820| 49 70 41 64 64 72 20 41 | 64 64 72 20 29 0d 0a 7b |IpAddr A|ddr )..{|
|00000830| 0d 0a 09 6c 6f 63 61 6c | 20 69 6e 74 20 55 70 6c |...local| int Upl|
|00000840| 69 6e 6b 50 6f 72 74 3b | 0d 0a 0d 0a 09 2f 2f 20 |inkPort;|.....// |
|00000850| 53 65 74 20 74 68 65 20 | 61 64 64 72 65 73 73 0d |Set the |address.|
|00000860| 0a 09 4d 61 73 74 65 72 | 53 65 72 76 65 72 49 70 |..Master|ServerIp|
|00000870| 41 64 64 72 2e 41 64 64 | 72 20 3d 20 41 64 64 72 |Addr.Add|r = Addr|
|00000880| 2e 41 64 64 72 3b 0d 0a | 0d 0a 09 2f 2f 20 48 61 |.Addr;..|...// Ha|
|00000890| 6e 64 6c 65 20 66 61 69 | 6c 75 72 65 2e 0d 0a 09 |ndle fai|lure....|
|000008a0| 69 66 28 20 4d 61 73 74 | 65 72 53 65 72 76 65 72 |if( Mast|erServer|
|000008b0| 49 70 41 64 64 72 2e 41 | 64 64 72 20 3d 3d 20 30 |IpAddr.A|ddr == 0|
|000008c0| 20 29 0d 0a 09 7b 0d 0a | 09 09 4c 6f 67 28 22 55 | )...{..|..Log("U|
|000008d0| 64 70 47 61 6d 65 53 70 | 79 55 70 6c 69 6e 6b 3a |dpGameSp|yUplink:|
|000008e0| 20 49 6e 76 61 6c 69 64 | 20 6d 61 73 74 65 72 20 | Invalid| master |
|000008f0| 73 65 72 76 65 72 20 61 | 64 64 72 65 73 73 2c 20 |server a|ddress, |
|00000900| 61 62 6f 72 74 69 6e 67 | 2e 22 29 3b 0d 0a 09 09 |aborting|.");....|
|00000910| 72 65 74 75 72 6e 3b 0d | 0a 09 7d 0d 0a 0d 0a 09 |return;.|..}.....|
|00000920| 2f 2f 20 44 69 73 70 6c | 61 79 20 73 75 63 63 65 |// Displ|ay succe|
|00000930| 73 73 20 6d 65 73 73 61 | 67 65 2e 0d 0a 09 4c 6f |ss messa|ge....Lo|
|00000940| 67 28 22 55 64 70 47 61 | 6d 65 53 70 79 55 70 6c |g("UdpGa|meSpyUpl|
|00000950| 69 6e 6b 3a 20 4d 61 73 | 74 65 72 20 53 65 72 76 |ink: Mas|ter Serv|
|00000960| 65 72 20 69 73 20 22 24 | 4d 61 73 74 65 72 53 65 |er is "$|MasterSe|
|00000970| 72 76 65 72 41 64 64 72 | 65 73 73 24 22 3a 22 24 |rverAddr|ess$":"$|
|00000980| 73 74 72 69 6e 67 28 4d | 61 73 74 65 72 53 65 72 |string(M|asterSer|
|00000990| 76 65 72 49 70 41 64 64 | 72 2e 50 6f 72 74 29 29 |verIpAdd|r.Port))|
|000009a0| 3b 0d 0a 0d 0a 09 2f 2f | 20 42 69 6e 64 20 74 68 |;.....//| Bind th|
|000009b0| 65 20 6c 6f 63 61 6c 20 | 70 6f 72 74 2e 0d 0a 09 |e local |port....|
|000009c0| 55 70 6c 69 6e 6b 50 6f | 72 74 20 3d 20 51 75 65 |UplinkPo|rt = Que|
|000009d0| 72 79 2e 50 6f 72 74 20 | 2b 20 31 3b 0d 0a 09 69 |ry.Port |+ 1;...i|
|000009e0| 66 28 20 42 69 6e 64 50 | 6f 72 74 28 55 70 6c 69 |f( BindP|ort(Upli|
|000009f0| 6e 6b 50 6f 72 74 2c 20 | 74 72 75 65 29 20 3d 3d |nkPort, |true) ==|
|00000a00| 20 30 20 29 0d 0a 09 7b | 0d 0a 09 09 4c 6f 67 28 | 0 )...{|....Log(|
|00000a10| 20 22 55 64 70 47 61 6d | 65 53 70 79 55 70 6c 69 | "UdpGam|eSpyUpli|
|00000a20| 6e 6b 3a 20 45 72 72 6f | 72 20 62 69 6e 64 69 6e |nk: Erro|r bindin|
|00000a30| 67 20 70 6f 72 74 2c 20 | 61 62 6f 72 74 69 6e 67 |g port, |aborting|
|00000a40| 2e 22 20 29 3b 0d 0a 09 | 09 72 65 74 75 72 6e 3b |." );...|.return;|
|00000a50| 0d 0a 09 7d 0d 0a 09 4c | 6f 67 28 22 55 64 70 47 |...}...L|og("UdpG|
|00000a60| 61 6d 65 53 70 79 55 70 | 6c 69 6e 6b 3a 20 50 6f |ameSpyUp|link: Po|
|00000a70| 72 74 20 22 24 55 70 6c | 69 6e 6b 50 6f 72 74 24 |rt "$Upl|inkPort$|
|00000a80| 22 20 73 75 63 63 65 73 | 73 66 75 6c 6c 79 20 62 |" succes|sfully b|
|00000a90| 6f 75 6e 64 2e 22 29 3b | 0d 0a 0d 0a 09 2f 2f 20 |ound.");|.....// |
|00000aa0| 53 74 61 72 74 20 74 72 | 61 6e 73 6d 69 74 74 69 |Start tr|ansmitti|
|00000ab0| 6e 67 2e 0d 0a 09 52 65 | 73 75 6d 65 28 29 3b 0d |ng....Re|sume();.|
|00000ac0| 0a 7d 0d 0a 0d 0a 2f 2f | 20 48 6f 73 74 20 72 65 |.}....//| Host re|
|00000ad0| 73 6f 6c 75 74 69 6f 6e | 20 66 61 69 6c 75 65 2e |solution| failue.|
|00000ae0| 0d 0a 66 75 6e 63 74 69 | 6f 6e 20 52 65 73 6f 6c |..functi|on Resol|
|00000af0| 76 65 46 61 69 6c 65 64 | 28 29 0d 0a 7b 0d 0a 09 |veFailed|()..{...|
|00000b00| 4c 6f 67 28 22 55 64 70 | 47 61 6d 65 53 70 79 55 |Log("Udp|GameSpyU|
|00000b10| 70 6c 69 6e 6b 3a 20 46 | 61 69 6c 65 64 20 74 6f |plink: F|ailed to|
|00000b20| 20 72 65 73 6f 6c 76 65 | 20 6d 61 73 74 65 72 20 | resolve| master |
|00000b30| 73 65 72 76 65 72 20 61 | 64 64 72 65 73 73 2c 20 |server a|ddress, |
|00000b40| 61 62 6f 72 74 69 6e 67 | 2e 22 29 3b 0d 0a 7d 0d |aborting|.");..}.|
|00000b50| 0a 0d 0a 2f 2f 20 4e 6f | 74 69 66 79 20 74 68 65 |...// No|tify the|
|00000b60| 20 4d 61 73 74 65 72 53 | 65 72 76 65 72 20 77 65 | MasterS|erver we|
|00000b70| 20 65 78 69 73 74 2e 0d | 0a 66 75 6e 63 74 69 6f | exist..|.functio|
|00000b80| 6e 20 54 69 6d 65 72 28 | 29 0d 0a 7b 0d 0a 09 6c |n Timer(|)..{...l|
|00000b90| 6f 63 61 6c 20 62 6f 6f | 6c 20 52 65 73 75 6c 74 |ocal boo|l Result|
|00000ba0| 3b 0d 0a 0d 0a 2f 2f 09 | 4c 6f 67 28 22 53 65 6e |;....//.|Log("Sen|
|00000bb0| 64 69 6e 67 20 47 61 6d | 65 53 70 79 20 68 65 61 |ding Gam|eSpy hea|
|00000bc0| 72 74 62 65 61 74 3a 22 | 40 48 65 61 72 74 62 65 |rtbeat:"|@Heartbe|
|00000bd0| 61 74 4d 65 73 73 61 67 | 65 29 3b 0d 0a 09 52 65 |atMessag|e);...Re|
|00000be0| 73 75 6c 74 20 3d 20 53 | 65 6e 64 54 65 78 74 28 |sult = S|endText(|
|00000bf0| 20 4d 61 73 74 65 72 53 | 65 72 76 65 72 49 70 41 | MasterS|erverIpA|
|00000c00| 64 64 72 2c 20 48 65 61 | 72 74 62 65 61 74 4d 65 |ddr, Hea|rtbeatMe|
|00000c10| 73 73 61 67 65 20 29 3b | 0d 0a 09 69 66 20 28 20 |ssage );|...if ( |
|00000c20| 21 52 65 73 75 6c 74 20 | 29 0d 0a 09 09 4c 6f 67 |!Result |)....Log|
|00000c30| 28 20 22 46 61 69 6c 65 | 64 20 74 6f 20 73 65 6e |( "Faile|d to sen|
|00000c40| 64 20 68 65 61 72 74 62 | 65 61 74 20 74 6f 20 6d |d heartb|eat to m|
|00000c50| 61 73 74 65 72 20 73 65 | 72 76 65 72 2e 22 29 3b |aster se|rver.");|
|00000c60| 0d 0a 7d 0d 0a 0d 0a 2f | 2f 20 53 74 6f 70 20 74 |..}..../|/ Stop t|
|00000c70| 68 65 20 75 70 6c 69 6e | 6b 2e 0d 0a 66 75 6e 63 |he uplin|k...func|
|00000c80| 74 69 6f 6e 20 48 61 6c | 74 28 29 0d 0a 7b 0d 0a |tion Hal|t()..{..|
|00000c90| 09 53 65 74 54 69 6d 65 | 72 28 30 2e 30 2c 20 66 |.SetTime|r(0.0, f|
|00000ca0| 61 6c 73 65 29 3b 0d 0a | 7d 0d 0a 0d 0a 2f 2f 20 |alse);..|}....// |
|00000cb0| 52 65 73 75 6d 65 20 74 | 68 65 20 75 70 6c 69 6e |Resume t|he uplin|
|00000cc0| 6b 2e 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 52 65 73 |k...func|tion Res|
|00000cd0| 75 6d 65 28 29 0d 0a 7b | 0d 0a 09 53 65 74 54 69 |ume()..{|...SetTi|
|00000ce0| 6d 65 72 28 55 70 64 61 | 74 65 4d 69 6e 75 74 65 |mer(Upda|teMinute|
|00000cf0| 73 20 2a 20 36 30 2c 20 | 74 72 75 65 29 3b 0d 0a |s * 60, |true);..|
|00000d00| 09 54 69 6d 65 72 28 29 | 3b 0d 0a 7d 0d 0a 0d 0a |.Timer()|;..}....|
|00000d10| 2f 2f 20 52 65 63 65 69 | 76 65 64 20 61 20 71 75 |// Recei|ved a qu|
|00000d20| 65 72 79 20 72 65 71 75 | 65 73 74 2e 0d 0a 65 76 |ery requ|est...ev|
|00000d30| 65 6e 74 20 52 65 63 65 | 69 76 65 64 54 65 78 74 |ent Rece|ivedText|
|00000d40| 28 20 49 70 41 64 64 72 | 20 41 64 64 72 2c 20 73 |( IpAddr| Addr, s|
|00000d50| 74 72 69 6e 67 20 54 65 | 78 74 20 29 0d 0a 7b 0d |tring Te|xt )..{.|
|00000d60| 0a 09 6c 6f 63 61 6c 20 | 73 74 72 69 6e 67 20 51 |..local |string Q|
|00000d70| 75 65 72 79 53 74 72 3b | 0d 0a 09 6c 6f 63 61 6c |ueryStr;|...local|
|00000d80| 20 62 6f 6f 6c 20 51 75 | 65 72 79 52 65 6d 61 69 | bool Qu|eryRemai|
|00000d90| 6e 69 6e 67 3b 0d 0a 09 | 6c 6f 63 61 6c 20 69 6e |ning;...|local in|
|00000da0| 74 20 20 51 75 65 72 79 | 4e 75 6d 2c 20 50 61 63 |t Query|Num, Pac|
|00000db0| 6b 65 74 4e 75 6d 3b 0d | 0a 0d 0a 09 2f 2f 20 41 |ketNum;.|....// A|
|00000dc0| 73 73 69 67 6e 20 74 68 | 69 73 20 70 61 63 6b 65 |ssign th|is packe|
|00000dd0| 74 20 61 20 75 6e 69 71 | 75 65 20 76 61 6c 75 65 |t a uniq|ue value|
|00000de0| 20 66 72 6f 6d 20 31 20 | 74 6f 20 31 30 30 0d 0a | from 1 |to 100..|
|00000df0| 09 43 75 72 72 65 6e 74 | 51 75 65 72 79 4e 75 6d |.Current|QueryNum|
|00000e00| 2b 2b 3b 0d 0a 09 69 66 | 20 28 43 75 72 72 65 6e |++;...if| (Curren|
|00000e10| 74 51 75 65 72 79 4e 75 | 6d 20 3e 20 31 30 30 29 |tQueryNu|m > 100)|
|00000e20| 0d 0a 09 09 43 75 72 72 | 65 6e 74 51 75 65 72 79 |....Curr|entQuery|
|00000e30| 4e 75 6d 20 3d 20 31 3b | 0d 0a 09 51 75 65 72 79 |Num = 1;|...Query|
|00000e40| 4e 75 6d 20 3d 20 43 75 | 72 72 65 6e 74 51 75 65 |Num = Cu|rrentQue|
|00000e50| 72 79 4e 75 6d 3b 0d 0a | 0d 0a 09 51 75 65 72 79 |ryNum;..|...Query|
|00000e60| 53 74 72 20 3d 20 54 65 | 78 74 3b 0d 0a 09 69 66 |Str = Te|xt;...if|
|00000e70| 20 28 51 75 65 72 79 53 | 74 72 20 3d 3d 20 22 22 | (QueryS|tr == ""|
|00000e80| 29 09 09 2f 2f 20 49 66 | 20 74 68 65 20 73 74 72 |)..// If| the str|
|00000e90| 69 6e 67 20 69 73 20 65 | 6d 70 74 79 2c 20 64 6f |ing is e|mpty, do|
|00000ea0| 6e 27 74 20 70 61 72 73 | 65 20 69 74 0d 0a 09 09 |n't pars|e it....|
|00000eb0| 51 75 65 72 79 52 65 6d | 61 69 6e 69 6e 67 20 3d |QueryRem|aining =|
|00000ec0| 20 66 61 6c 73 65 3b 0d | 0a 09 65 6c 73 65 0d 0a | false;.|..else..|
|00000ed0| 09 09 51 75 65 72 79 52 | 65 6d 61 69 6e 69 6e 67 |..QueryR|emaining|
|00000ee0| 20 3d 20 74 72 75 65 3b | 0d 0a 0d 0a 09 77 68 69 | = true;|.....whi|
|00000ef0| 6c 65 20 28 51 75 65 72 | 79 52 65 6d 61 69 6e 69 |le (Quer|yRemaini|
|00000f00| 6e 67 29 20 7b 0d 0a 09 | 09 51 75 65 72 79 53 74 |ng) {...|.QuerySt|
|00000f10| 72 20 3d 20 50 61 72 73 | 65 51 75 65 72 79 28 41 |r = Pars|eQuery(A|
|00000f20| 64 64 72 2c 20 51 75 65 | 72 79 53 74 72 2c 20 51 |ddr, Que|ryStr, Q|
|00000f30| 75 65 72 79 4e 75 6d 2c | 20 50 61 63 6b 65 74 4e |ueryNum,| PacketN|
|00000f40| 75 6d 29 3b 0d 0a 09 09 | 69 66 20 28 51 75 65 72 |um);....|if (Quer|
|00000f50| 79 53 74 72 20 3d 3d 20 | 22 22 29 0d 0a 09 09 09 |yStr == |"").....|
|00000f60| 51 75 65 72 79 52 65 6d | 61 69 6e 69 6e 67 20 3d |QueryRem|aining =|
|00000f70| 20 66 61 6c 73 65 3b 0d | 0a 09 09 65 6c 73 65 0d | false;.|...else.|
|00000f80| 0a 09 09 09 51 75 65 72 | 79 52 65 6d 61 69 6e 69 |....Quer|yRemaini|
|00000f90| 6e 67 20 3d 20 74 72 75 | 65 3b 0d 0a 09 7d 0d 0a |ng = tru|e;...}..|
|00000fa0| 7d 0d 0a 0d 0a 66 75 6e | 63 74 69 6f 6e 20 62 6f |}....fun|ction bo|
|00000fb0| 6f 6c 20 50 61 72 73 65 | 4e 65 78 74 51 75 65 72 |ol Parse|NextQuer|
|00000fc0| 79 28 20 73 74 72 69 6e | 67 20 51 75 65 72 79 2c |y( strin|g Query,|
|00000fd0| 20 6f 75 74 20 73 74 72 | 69 6e 67 20 51 75 65 72 | out str|ing Quer|
|00000fe0| 79 54 79 70 65 2c 20 6f | 75 74 20 73 74 72 69 6e |yType, o|ut strin|
|00000ff0| 67 20 51 75 65 72 79 56 | 61 6c 75 65 2c 20 6f 75 |g QueryV|alue, ou|
|00001000| 74 20 73 74 72 69 6e 67 | 20 51 75 65 72 79 52 65 |t string| QueryRe|
|00001010| 73 74 2c 20 6f 75 74 20 | 73 74 72 69 6e 67 20 46 |st, out |string F|
|00001020| 69 6e 61 6c 50 61 63 6b | 65 74 20 29 0d 0a 7b 0d |inalPack|et )..{.|
|00001030| 0a 09 6c 6f 63 61 6c 20 | 73 74 72 69 6e 67 20 54 |..local |string T|
|00001040| 65 6d 70 51 75 65 72 79 | 3b 0d 0a 09 6c 6f 63 61 |empQuery|;...loca|
|00001050| 6c 20 69 6e 74 20 43 6c | 6f 73 69 6e 67 53 6c 61 |l int Cl|osingSla|
|00001060| 73 68 3b 0d 0a 0d 0a 09 | 69 66 20 28 51 75 65 72 |sh;.....|if (Quer|
|00001070| 79 20 3d 3d 20 22 22 29 | 0d 0a 09 09 72 65 74 75 |y == "")|....retu|
|00001080| 72 6e 20 66 61 6c 73 65 | 3b 0d 0a 0d 0a 09 2f 2f |rn false|;.....//|
|00001090| 20 51 75 65 72 79 20 73 | 68 6f 75 6c 64 20 62 65 | Query s|hould be|
|000010a0| 3a 0d 0a 09 2f 2f 20 20 | 20 5c 5b 74 79 70 65 5d |:...// | \[type]|
|000010b0| 5c 3c 76 61 6c 75 65 3e | 0d 0a 09 69 66 20 28 4c |\<value>|...if (L|
|000010c0| 65 66 74 28 51 75 65 72 | 79 2c 20 31 29 20 3d 3d |eft(Quer|y, 1) ==|
|000010d0| 20 22 5c 5c 22 29 0d 0a | 09 7b 0d 0a 09 09 2f 2f | "\\")..|.{....//|
|000010e0| 20 43 68 65 63 6b 20 74 | 6f 20 73 65 65 20 69 66 | Check t|o see if|
|000010f0| 20 63 6c 6f 73 65 64 2e | 0d 0a 09 09 43 6c 6f 73 | closed.|....Clos|
|00001100| 69 6e 67 53 6c 61 73 68 | 20 3d 20 49 6e 53 74 72 |ingSlash| = InStr|
|00001110| 28 52 69 67 68 74 28 51 | 75 65 72 79 2c 20 4c 65 |(Right(Q|uery, Le|
|00001120| 6e 28 51 75 65 72 79 29 | 2d 31 29 2c 20 22 5c 5c |n(Query)|-1), "\\|
|00001130| 22 29 3b 0d 0a 09 09 69 | 66 20 28 43 6c 6f 73 69 |");....i|f (Closi|
|00001140| 6e 67 53 6c 61 73 68 20 | 3d 3d 20 30 29 0d 0a 09 |ngSlash |== 0)...|
|00001150| 09 09 72 65 74 75 72 6e | 20 66 61 6c 73 65 3b 0d |..return| false;.|
|00001160| 0a 0d 0a 09 09 54 65 6d | 70 51 75 65 72 79 20 3d |.....Tem|pQuery =|
|00001170| 20 51 75 65 72 79 3b 0d | 0a 0d 0a 09 09 2f 2f 20 | Query;.|.....// |
|00001180| 51 75 65 72 79 20 6c 6f | 6f 6b 73 20 6c 69 6b 65 |Query lo|oks like|
|00001190| 3a 0d 0a 09 09 2f 2f 20 | 20 5c 5b 74 79 70 65 5d |:....// | \[type]|
|000011a0| 5c 0d 0a 09 09 51 75 65 | 72 79 54 79 70 65 20 3d |\....Que|ryType =|
|000011b0| 20 52 69 67 68 74 28 51 | 75 65 72 79 2c 20 4c 65 | Right(Q|uery, Le|
|000011c0| 6e 28 51 75 65 72 79 29 | 2d 31 29 3b 0d 0a 09 09 |n(Query)|-1);....|
|000011d0| 51 75 65 72 79 54 79 70 | 65 20 3d 20 4c 65 66 74 |QueryTyp|e = Left|
|000011e0| 28 51 75 65 72 79 54 79 | 70 65 2c 20 43 6c 6f 73 |(QueryTy|pe, Clos|
|000011f0| 69 6e 67 53 6c 61 73 68 | 29 3b 0d 0a 0d 0a 09 09 |ingSlash|);......|
|00001200| 51 75 65 72 79 52 65 73 | 74 20 3d 20 52 69 67 68 |QueryRes|t = Righ|
|00001210| 74 28 51 75 65 72 79 2c | 20 4c 65 6e 28 51 75 65 |t(Query,| Len(Que|
|00001220| 72 79 29 20 2d 20 28 4c | 65 6e 28 51 75 65 72 79 |ry) - (L|en(Query|
|00001230| 54 79 70 65 29 20 2b 20 | 32 29 29 3b 0d 0a 0d 0a |Type) + |2));....|
|00001240| 09 09 69 66 20 28 28 51 | 75 65 72 79 52 65 73 74 |..if ((Q|ueryRest|
|00001250| 20 3d 3d 20 22 22 29 20 | 7c 7c 20 28 4c 65 6e 28 | == "") ||| (Len(|
|00001260| 51 75 65 72 79 52 65 73 | 74 29 20 3d 3d 20 31 29 |QueryRes|t) == 1)|
|00001270| 29 0d 0a 09 09 7b 0d 0a | 09 09 09 46 69 6e 61 6c |)....{..|...Final|
|00001280| 50 61 63 6b 65 74 20 3d | 20 22 66 69 6e 61 6c 22 |Packet =| "final"|
|00001290| 3b 0d 0a 09 09 09 72 65 | 74 75 72 6e 20 74 72 75 |;.....re|turn tru|
|000012a0| 65 3b 0d 0a 09 09 7d 20 | 65 6c 73 65 20 69 66 20 |e;....} |else if |
|000012b0| 28 4c 65 66 74 28 51 75 | 65 72 79 52 65 73 74 2c |(Left(Qu|eryRest,|
|000012c0| 20 31 29 20 3d 3d 20 22 | 5c 5c 22 29 0d 0a 09 09 | 1) == "|\\")....|
|000012d0| 09 72 65 74 75 72 6e 20 | 74 72 75 65 3b 09 2f 2f |.return |true;.//|
|000012e0| 20 5c 74 79 70 65 5c 5c | 0d 0a 0d 0a 09 09 2f 2f | \type\\|......//|
|000012f0| 20 51 75 65 72 79 20 6c | 6f 6f 6b 73 20 6c 69 6b | Query l|ooks lik|
|00001300| 65 3a 0d 0a 09 09 2f 2f | 20 20 5c 74 79 70 65 5c |e:....//| \type\|
|00001310| 76 61 6c 75 65 0d 0a 09 | 09 43 6c 6f 73 69 6e 67 |value...|.Closing|
|00001320| 53 6c 61 73 68 20 3d 20 | 49 6e 53 74 72 28 51 75 |Slash = |InStr(Qu|
|00001330| 65 72 79 52 65 73 74 2c | 20 22 5c 5c 22 29 3b 0d |eryRest,| "\\");.|
|00001340| 0a 09 09 69 66 20 28 43 | 6c 6f 73 69 6e 67 53 6c |...if (C|losingSl|
|00001350| 61 73 68 20 3e 3d 20 30 | 29 0d 0a 09 09 09 51 75 |ash >= 0|).....Qu|
|00001360| 65 72 79 56 61 6c 75 65 | 20 3d 20 4c 65 66 74 28 |eryValue| = Left(|
|00001370| 51 75 65 72 79 52 65 73 | 74 2c 20 43 6c 6f 73 69 |QueryRes|t, Closi|
|00001380| 6e 67 53 6c 61 73 68 29 | 3b 0d 0a 09 09 65 6c 73 |ngSlash)|;....els|
|00001390| 65 0d 0a 09 09 09 51 75 | 65 72 79 56 61 6c 75 65 |e.....Qu|eryValue|
|000013a0| 20 3d 20 51 75 65 72 79 | 52 65 73 74 3b 0d 0a 0d | = Query|Rest;...|
|000013b0| 0a 09 09 51 75 65 72 79 | 52 65 73 74 20 3d 20 52 |...Query|Rest = R|
|000013c0| 69 67 68 74 28 51 75 65 | 72 79 2c 20 4c 65 6e 28 |ight(Que|ry, Len(|
|000013d0| 51 75 65 72 79 29 20 2d | 20 28 4c 65 6e 28 51 75 |Query) -| (Len(Qu|
|000013e0| 65 72 79 54 79 70 65 29 | 20 2b 20 4c 65 6e 28 51 |eryType)| + Len(Q|
|000013f0| 75 65 72 79 56 61 6c 75 | 65 29 20 2b 20 33 29 29 |ueryValu|e) + 3))|
|00001400| 3b 0d 0a 09 09 69 66 20 | 28 51 75 65 72 79 52 65 |;....if |(QueryRe|
|00001410| 73 74 20 3d 3d 20 22 22 | 29 0d 0a 09 09 7b 0d 0a |st == ""|)....{..|
|00001420| 09 09 09 46 69 6e 61 6c | 50 61 63 6b 65 74 20 3d |...Final|Packet =|
|00001430| 20 22 66 69 6e 61 6c 22 | 3b 0d 0a 09 09 09 72 65 | "final"|;.....re|
|00001440| 74 75 72 6e 20 74 72 75 | 65 3b 0d 0a 09 09 7d 20 |turn tru|e;....} |
|00001450| 65 6c 73 65 0d 0a 09 09 | 09 72 65 74 75 72 6e 20 |else....|.return |
|00001460| 74 72 75 65 3b 0d 0a 09 | 7d 20 65 6c 73 65 20 7b |true;...|} else {|
|00001470| 0d 0a 09 09 72 65 74 75 | 72 6e 20 66 61 6c 73 65 |....retu|rn false|
|00001480| 3b 0d 0a 09 7d 0d 0a 7d | 0d 0a 0d 0a 66 75 6e 63 |;...}..}|....func|
|00001490| 74 69 6f 6e 20 73 74 72 | 69 6e 67 20 50 61 72 73 |tion str|ing Pars|
|000014a0| 65 51 75 65 72 79 28 20 | 49 70 41 64 64 72 20 41 |eQuery( |IpAddr A|
|000014b0| 64 64 72 2c 20 63 6f 65 | 72 63 65 20 73 74 72 69 |ddr, coe|rce stri|
|000014c0| 6e 67 20 51 75 65 72 79 | 53 74 72 2c 20 69 6e 74 |ng Query|Str, int|
|000014d0| 20 51 75 65 72 79 4e 75 | 6d 2c 20 6f 75 74 20 69 | QueryNu|m, out i|
|000014e0| 6e 74 20 50 61 63 6b 65 | 74 4e 75 6d 20 29 0d 0a |nt Packe|tNum )..|
|000014f0| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 73 74 72 69 6e 67 |{...loca|l string|
|00001500| 20 51 75 65 72 79 54 79 | 70 65 2c 20 51 75 65 72 | QueryTy|pe, Quer|
|00001510| 79 56 61 6c 75 65 2c 20 | 51 75 65 72 79 52 65 73 |yValue, |QueryRes|
|00001520| 74 2c 20 56 61 6c 69 64 | 61 74 69 6f 6e 53 74 72 |t, Valid|ationStr|
|00001530| 69 6e 67 3b 0d 0a 09 6c | 6f 63 61 6c 20 62 6f 6f |ing;...l|ocal boo|
|00001540| 6c 20 52 65 73 75 6c 74 | 3b 0d 0a 09 6c 6f 63 61 |l Result|;...loca|
|00001550| 6c 20 73 74 72 69 6e 67 | 20 46 69 6e 61 6c 50 61 |l string| FinalPa|
|00001560| 63 6b 65 74 3b 0d 0a 0d | 0a 09 52 65 73 75 6c 74 |cket;...|..Result|
|00001570| 20 3d 20 50 61 72 73 65 | 4e 65 78 74 51 75 65 72 | = Parse|NextQuer|
|00001580| 79 28 51 75 65 72 79 53 | 74 72 2c 20 51 75 65 72 |y(QueryS|tr, Quer|
|00001590| 79 54 79 70 65 2c 20 51 | 75 65 72 79 56 61 6c 75 |yType, Q|ueryValu|
|000015a0| 65 2c 20 51 75 65 72 79 | 52 65 73 74 2c 20 46 69 |e, Query|Rest, Fi|
|000015b0| 6e 61 6c 50 61 63 6b 65 | 74 29 3b 0d 0a 09 69 66 |nalPacke|t);...if|
|000015c0| 28 20 21 52 65 73 75 6c | 74 20 29 0d 0a 09 09 72 |( !Resul|t )....r|
|000015d0| 65 74 75 72 6e 20 22 22 | 3b 0d 0a 0d 0a 09 69 66 |eturn ""|;.....if|
|000015e0| 28 20 51 75 65 72 79 54 | 79 70 65 3d 3d 22 62 61 |( QueryT|ype=="ba|
|000015f0| 73 69 63 22 20 29 0d 0a | 09 7b 0d 0a 09 09 2f 2f |sic" )..|.{....//|
|00001600| 20 49 67 6e 6f 72 65 2e | 0d 0a 09 09 52 65 73 75 | Ignore.|....Resu|
|00001610| 6c 74 20 3d 20 74 72 75 | 65 3b 0d 0a 09 7d 0d 0a |lt = tru|e;...}..|
|00001620| 09 65 6c 73 65 20 69 66 | 28 20 51 75 65 72 79 54 |.else if|( QueryT|
|00001630| 79 70 65 3d 3d 22 73 65 | 63 75 72 65 22 20 29 0d |ype=="se|cure" ).|
|00001640| 0a 09 7b 0d 0a 09 09 56 | 61 6c 69 64 61 74 69 6f |..{....V|alidatio|
|00001650| 6e 53 74 72 69 6e 67 20 | 3d 20 22 5c 5c 76 61 6c |nString |= "\\val|
|00001660| 69 64 61 74 65 5c 5c 22 | 24 47 61 6d 65 53 70 79 |idate\\"|$GameSpy|
|00001670| 56 61 6c 69 64 61 74 65 | 28 51 75 65 72 79 56 61 |Validate|(QueryVa|
|00001680| 6c 75 65 29 3b 0d 0a 09 | 09 52 65 73 75 6c 74 20 |lue);...|.Result |
|00001690| 3d 20 53 65 6e 64 51 75 | 65 72 79 50 61 63 6b 65 |= SendQu|eryPacke|
|000016a0| 74 28 41 64 64 72 2c 20 | 56 61 6c 69 64 61 74 69 |t(Addr, |Validati|
|000016b0| 6f 6e 53 74 72 69 6e 67 | 2c 20 51 75 65 72 79 4e |onString|, QueryN|
|000016c0| 75 6d 2c 20 2b 2b 50 61 | 63 6b 65 74 4e 75 6d 2c |um, ++Pa|cketNum,|
|000016d0| 20 46 69 6e 61 6c 50 61 | 63 6b 65 74 29 3b 0d 0a | FinalPa|cket);..|
|000016e0| 09 7d 0d 0a 09 72 65 74 | 75 72 6e 20 51 75 65 72 |.}...ret|urn Quer|
|000016f0| 79 52 65 73 74 3b 0d 0a | 7d 0d 0a 0d 0a 2f 2f 20 |yRest;..|}....// |
|00001700| 53 65 6e 64 51 75 65 72 | 79 50 61 63 6b 65 74 20 |SendQuer|yPacket |
|00001710| 69 73 20 61 20 77 72 61 | 70 70 65 72 20 66 6f 72 |is a wra|pper for|
|00001720| 20 53 65 6e 64 54 65 78 | 74 20 74 68 61 74 20 61 | SendTex|t that a|
|00001730| 6c 6c 6f 77 73 20 66 6f | 72 20 70 61 63 6b 65 74 |llows fo|r packet|
|00001740| 20 6e 75 6d 62 65 72 69 | 6e 67 2e 0d 0a 66 75 6e | numberi|ng...fun|
|00001750| 63 74 69 6f 6e 20 62 6f | 6f 6c 20 53 65 6e 64 51 |ction bo|ol SendQ|
|00001760| 75 65 72 79 50 61 63 6b | 65 74 28 49 70 41 64 64 |ueryPack|et(IpAdd|
|00001770| 72 20 41 64 64 72 2c 20 | 63 6f 65 72 63 65 20 73 |r Addr, |coerce s|
|00001780| 74 72 69 6e 67 20 53 65 | 6e 64 53 74 72 69 6e 67 |tring Se|ndString|
|00001790| 2c 20 69 6e 74 20 51 75 | 65 72 79 4e 75 6d 2c 20 |, int Qu|eryNum, |
|000017a0| 69 6e 74 20 50 61 63 6b | 65 74 4e 75 6d 2c 20 73 |int Pack|etNum, s|
|000017b0| 74 72 69 6e 67 20 46 69 | 6e 61 6c 50 61 63 6b 65 |tring Fi|nalPacke|
|000017c0| 74 29 0d 0a 7b 0d 0a 09 | 6c 6f 63 61 6c 20 62 6f |t)..{...|local bo|
|000017d0| 6f 6c 20 52 65 73 75 6c | 74 3b 0d 0a 09 69 66 20 |ol Resul|t;...if |
|000017e0| 28 46 69 6e 61 6c 50 61 | 63 6b 65 74 20 3d 3d 20 |(FinalPa|cket == |
|000017f0| 22 66 69 6e 61 6c 22 29 | 20 7b 0d 0a 09 09 53 65 |"final")| {....Se|
|00001800| 6e 64 53 74 72 69 6e 67 | 20 3d 20 53 65 6e 64 53 |ndString| = SendS|
|00001810| 74 72 69 6e 67 24 22 5c | 5c 66 69 6e 61 6c 5c 5c |tring$"\|\final\\|
|00001820| 22 3b 0d 0a 09 7d 0d 0a | 09 53 65 6e 64 53 74 72 |";...}..|.SendStr|
|00001830| 69 6e 67 20 3d 20 53 65 | 6e 64 53 74 72 69 6e 67 |ing = Se|ndString|
|00001840| 24 22 5c 5c 71 75 65 72 | 79 69 64 5c 5c 22 24 51 |$"\\quer|yid\\"$Q|
|00001850| 75 65 72 79 4e 75 6d 24 | 22 2e 22 24 50 61 63 6b |ueryNum$|"."$Pack|
|00001860| 65 74 4e 75 6d 3b 0d 0a | 0d 0a 09 52 65 73 75 6c |etNum;..|...Resul|
|00001870| 74 20 3d 20 53 65 6e 64 | 54 65 78 74 28 41 64 64 |t = Send|Text(Add|
|00001880| 72 2c 20 53 65 6e 64 53 | 74 72 69 6e 67 29 3b 0d |r, SendS|tring);.|
|00001890| 0a 0d 0a 09 72 65 74 75 | 72 6e 20 52 65 73 75 6c |....retu|rn Resul|
|000018a0| 74 3b 0d 0a 7d 0d 0a 0d | 0a 00 |t;..}...|.. |
+--------+-------------------------+-------------------------+--------+--------+