home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 July & August / Gamestar_64_2004-07-08_dvd.iso / Patche / ut2004-winpatch3204.exe / UT2004-Patch / System / Ipdrv.u / IpAddr_UdpGamespyQuery_ScriptText.TextBuffer < prev    next >
Unknown  |  2004-05-10  |  14.8 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.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 4e ec 01 2f 2f 3d 3d 3d |........|N..//===|
|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 3d 0d 0a 2f 2f 20 55 |========|==..// U|
|00000060| 64 70 47 61 6d 65 53 70 | 79 51 75 65 72 79 0d 0a |dpGameSp|yQuery..|
|00000070| 2f 2f 0d 0a 2f 2f 20 56 | 65 72 73 69 6f 6e 3a 20 |//..// V|ersion: |
|00000080| 31 2e 35 0d 0a 2f 2f 0d | 0a 2f 2f 20 54 68 69 73 |1.5..//.|.// This|
|00000090| 20 71 75 65 72 79 20 73 | 65 72 76 65 72 20 69 73 | query s|erver is|
|000000a0| 20 63 6f 6d 70 6c 69 61 | 6e 74 20 77 69 74 68 20 | complia|nt with |
|000000b0| 74 68 65 20 47 61 6d 65 | 53 70 79 20 55 70 6c 69 |the Game|Spy Upli|
|000000c0| 6e 6b 20 53 70 65 63 69 | 66 69 63 61 74 69 6f 6e |nk Speci|fication|
|000000d0| 2e 0d 0a 2f 2f 20 54 68 | 65 20 73 70 65 63 69 66 |...// Th|e specif|
|000000e0| 69 63 61 74 69 6f 6e 20 | 69 73 20 61 76 61 69 6c |ication |is avail|
|000000f0| 61 62 6c 65 20 61 74 20 | 68 74 74 70 3a 2f 2f 77 |able at |http://w|
|00000100| 77 77 2e 67 61 6d 65 73 | 70 79 2e 63 6f 6d 2f 64 |ww.games|py.com/d|
|00000110| 65 76 65 6c 6f 70 65 72 | 0d 0a 2f 2f 20 61 6e 64 |eveloper|..// and|
|00000120| 20 6d 69 67 68 74 20 62 | 65 20 6f 66 20 75 73 65 | might b|e of use|
|00000130| 20 74 6f 20 70 72 6f 67 | 61 6d 6d 65 72 73 20 77 | to prog|ammers w|
|00000140| 68 6f 20 61 72 65 20 77 | 72 69 74 69 6e 67 20 6f |ho are w|riting o|
|00000150| 72 20 6d 61 69 6e 74 61 | 69 6e 69 6e 67 0d 0a 2f |r mainta|ining../|
|00000160| 2f 20 74 68 65 69 72 20 | 6f 77 6e 20 73 74 61 74 |/ their |own stat|
|00000170| 20 67 61 74 68 65 72 69 | 6e 67 2f 67 61 6d 65 20 | gatheri|ng/game |
|00000180| 71 75 65 72 79 69 6e 67 | 20 73 6f 66 74 77 61 72 |querying| softwar|
|00000190| 65 2e 0d 0a 2f 2f 0d 0a | 2f 2f 20 4e 6f 74 65 3a |e...//..|// Note:|
|000001a0| 20 43 75 72 72 65 6e 74 | 6c 79 2c 20 53 65 6e 64 | Current|ly, Send|
|000001b0| 54 65 78 74 20 72 65 74 | 75 72 6e 73 20 66 61 6c |Text ret|urns fal|
|000001c0| 73 65 20 69 66 20 73 75 | 63 63 65 73 73 66 75 6c |se if su|ccessful|
|000001d0| 2e 0d 0a 2f 2f 0d 0a 2f | 2f 20 46 75 6c 6c 20 64 |...//../|/ Full d|
|000001e0| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 6e 20 |ocumenta|tion on |
|000001f0| 74 68 69 73 20 63 6c 61 | 73 73 20 69 73 20 61 76 |this cla|ss is av|
|00000200| 61 69 6c 61 62 6c 65 20 | 61 74 20 68 74 74 70 3a |ailable |at http:|
|00000210| 2f 2f 75 6e 72 65 61 6c | 2e 65 70 69 63 67 61 6d |//unreal|.epicgam|
|00000220| 65 73 2e 63 6f 6d 2f 0d | 0a 2f 2f 0d 0a 2f 2f 3d |es.com/.|.//..//=|
|00000230| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000240| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000250| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000260| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000270| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 0d 0a 63 6c |========|====..cl|
|00000280| 61 73 73 20 55 64 70 47 | 61 6d 65 53 70 79 51 75 |ass UdpG|ameSpyQu|
|00000290| 65 72 79 20 65 78 74 65 | 6e 64 73 20 55 64 70 4c |ery exte|nds UdpL|
|000002a0| 69 6e 6b 20 63 6f 6e 66 | 69 67 3b 0d 0a 0d 0a 2f |ink conf|ig;..../|
|000002b0| 2f 20 47 61 6d 65 20 53 | 65 72 76 65 72 20 43 6f |/ Game S|erver Co|
|000002c0| 6e 66 69 67 2e 0d 0a 76 | 61 72 28 29 20 6e 61 6d |nfig...v|ar() nam|
|000002d0| 65 09 09 09 09 09 51 75 | 65 72 79 4e 61 6d 65 3b |e.....Qu|eryName;|
|000002e0| 09 09 09 2f 2f 20 4e 61 | 6d 65 20 74 6f 20 73 65 |...// Na|me to se|
|000002f0| 74 20 74 68 69 73 20 6f | 62 6a 65 63 74 27 73 20 |t this o|bject's |
|00000300| 54 61 67 20 74 6f 2e 0d | 0a 76 61 72 20 69 6e 74 |Tag to..|.var int|
|00000310| 09 09 09 09 09 20 20 20 | 20 43 75 72 72 65 6e 74 |..... | Current|
|00000320| 51 75 65 72 79 4e 75 6d | 3b 09 2f 2f 20 51 75 65 |QueryNum|;.// Que|
|00000330| 72 79 20 49 44 20 4e 75 | 6d 62 65 72 2e 0d 0a 2f |ry ID Nu|mber.../|
|00000340| 2f 63 72 74 0d 0a 76 61 | 72 20 73 74 72 69 6e 67 |/crt..va|r string|
|00000350| 20 52 65 70 6c 79 44 61 | 74 61 3b 0d 0a 0d 0a 76 | ReplyDa|ta;....v|
|00000360| 61 72 20 67 6c 6f 62 61 | 6c 63 6f 6e 66 69 67 20 |ar globa|lconfig |
|00000370| 69 6e 74 09 09 4d 69 6e | 4e 65 74 56 65 72 3b 0d |int..Min|NetVer;.|
|00000380| 0a 0d 0a 2f 2f 21 21 20 | 48 61 63 6b 20 74 6f 20 |...//!! |Hack to |
|00000390| 70 72 65 76 65 6e 74 20 | 70 6f 72 74 20 73 77 61 |prevent |port swa|
|000003a0| 70 70 69 6e 67 0d 0a 76 | 61 72 20 67 6c 6f 62 61 |pping..v|ar globa|
|000003b0| 6c 63 6f 6e 66 69 67 20 | 69 6e 74 09 09 4f 6c 64 |lconfig |int..Old|
|000003c0| 51 75 65 72 79 50 6f 72 | 74 4e 75 6d 62 65 72 3b |QueryPor|tNumber;|
|000003d0| 0d 0a 76 61 72 20 67 6c | 6f 62 61 6c 63 6f 6e 66 |..var gl|obalconf|
|000003e0| 69 67 20 62 6f 6f 6c 09 | 09 62 52 65 73 74 61 72 |ig bool.|.bRestar|
|000003f0| 74 53 65 72 76 65 72 4f | 6e 50 6f 72 74 53 77 61 |tServerO|nPortSwa|
|00000400| 70 3b 0d 0a 76 61 72 20 | 67 6c 6f 62 61 6c 63 6f |p;..var |globalco|
|00000410| 6e 66 69 67 20 62 6f 6f | 6c 20 20 20 20 20 20 20 |nfig boo|l |
|00000420| 62 44 65 62 75 67 50 6f | 72 74 53 77 61 70 73 3b |bDebugPo|rtSwaps;|
|00000430| 0d 0a 0d 0a 2f 2f 20 49 | 6e 69 74 69 61 6c 69 7a |....// I|nitializ|
|00000440| 65 2e 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 50 72 65 |e...func|tion Pre|
|00000450| 42 65 67 69 6e 50 6c 61 | 79 28 29 0d 0a 7b 0d 0a |BeginPla|y()..{..|
|00000460| 09 6c 6f 63 61 6c 20 69 | 6e 74 20 62 6f 75 6e 64 |.local i|nt bound|
|00000470| 70 6f 72 74 2c 20 72 65 | 71 75 65 73 74 70 6f 72 |port, re|questpor|
|00000480| 74 3b 0d 0a 0d 0a 09 2f | 2f 20 53 65 74 20 74 68 |t;...../|/ Set th|
|00000490| 65 20 54 61 67 0d 0a 09 | 54 61 67 20 3d 20 51 75 |e Tag...|Tag = Qu|
|000004a0| 65 72 79 4e 61 6d 65 3b | 0d 0a 0d 0a 09 2f 2f 20 |eryName;|.....// |
|000004b0| 42 69 6e 64 20 74 68 65 | 20 6c 69 73 74 65 6e 20 |Bind the| listen |
|000004c0| 73 6f 63 6b 65 74 0d 0a | 09 72 65 71 75 65 73 74 |socket..|.request|
|000004d0| 70 6f 72 74 20 3d 20 4c | 65 76 65 6c 2e 47 61 6d |port = L|evel.Gam|
|000004e0| 65 2e 47 65 74 53 65 72 | 76 65 72 50 6f 72 74 28 |e.GetSer|verPort(|
|000004f0| 29 2b 31 30 3b 0d 0a 09 | 62 6f 75 6e 64 70 6f 72 |)+10;...|boundpor|
|00000500| 74 20 3d 20 42 69 6e 64 | 50 6f 72 74 28 72 65 71 |t = Bind|Port(req|
|00000510| 75 65 73 74 70 6f 72 74 | 2c 20 74 72 75 65 29 3b |uestport|, true);|
|00000520| 0d 0a 09 69 66 28 20 62 | 6f 75 6e 64 70 6f 72 74 |...if( b|oundport|
|00000530| 20 3d 3d 20 30 20 29 0d | 0a 09 7b 0d 0a 09 09 4c | == 0 ).|..{....L|
|00000540| 6f 67 28 22 55 64 70 53 | 65 72 76 65 72 51 75 65 |og("UdpS|erverQue|
|00000550| 72 79 3a 20 50 6f 72 74 | 20 66 61 69 6c 65 64 20 |ry: Port| failed |
|00000560| 74 6f 20 62 69 6e 64 2e | 22 29 3b 0d 0a 09 09 72 |to bind.|");....r|
|00000570| 65 74 75 72 6e 3b 0d 0a | 09 7d 0d 0a 09 4c 6f 67 |eturn;..|.}...Log|
|00000580| 28 22 55 64 70 53 65 72 | 76 65 72 51 75 65 72 79 |("UdpSer|verQuery|
|00000590| 28 63 72 74 29 3a 20 50 | 6f 72 74 20 22 24 62 6f |(crt): P|ort "$bo|
|000005a0| 75 6e 64 70 6f 72 74 24 | 22 20 73 75 63 63 65 73 |undport$|" succes|
|000005b0| 73 66 75 6c 6c 79 20 62 | 6f 75 6e 64 2e 22 29 3b |sfully b|ound.");|
|000005c0| 0d 0a 0d 0a 09 69 66 28 | 20 62 52 65 73 74 61 72 |.....if(| bRestar|
|000005d0| 74 53 65 72 76 65 72 4f | 6e 50 6f 72 74 53 77 61 |tServerO|nPortSwa|
|000005e0| 70 20 29 0d 0a 09 7b 0d | 0a 09 09 69 66 28 20 4f |p )...{.|...if( O|
|000005f0| 6c 64 51 75 65 72 79 50 | 6f 72 74 4e 75 6d 62 65 |ldQueryP|ortNumbe|
|00000600| 72 20 21 3d 20 30 20 29 | 0d 0a 09 09 7b 0d 0a 09 |r != 0 )|....{...|
|00000610| 09 09 69 66 28 20 4f 6c | 64 51 75 65 72 79 50 6f |..if( Ol|dQueryPo|
|00000620| 72 74 4e 75 6d 62 65 72 | 20 21 3d 20 62 6f 75 6e |rtNumber| != boun|
|00000630| 64 70 6f 72 74 20 29 0d | 0a 09 09 09 7b 0d 0a 09 |dport ).|....{...|
|00000640| 09 09 09 4c 6f 67 28 22 | 50 4f 52 54 53 57 41 50 |...Log("|PORTSWAP|
|00000650| 20 64 65 74 65 63 74 65 | 64 2c 20 65 78 69 74 69 | detecte|d, exiti|
|00000660| 6e 67 2e 2e 2e 20 20 6f | 6c 64 20 70 6f 72 74 3a |ng... o|ld port:|
|00000670| 20 22 24 4f 6c 64 51 75 | 65 72 79 50 6f 72 74 4e | "$OldQu|eryPortN|
|00000680| 75 6d 62 65 72 24 22 2c | 20 6e 65 77 20 70 6f 72 |umber$",| new por|
|00000690| 74 3a 20 22 24 62 6f 75 | 6e 64 70 6f 72 74 24 22 |t: "$bou|ndport$"|
|000006a0| 2c 20 72 65 71 75 65 73 | 74 65 64 20 70 6f 72 74 |, reques|ted port|
|000006b0| 3a 20 22 24 72 65 71 75 | 65 73 74 70 6f 72 74 29 |: "$requ|estport)|
|000006c0| 3b 0d 0a 09 09 09 09 69 | 66 20 28 20 62 44 65 62 |;......i|f ( bDeb|
|000006d0| 75 67 50 6f 72 74 53 77 | 61 70 73 20 29 0d 0a 09 |ugPortSw|aps )...|
|000006e0| 09 09 09 09 44 65 62 75 | 67 50 6f 72 74 53 77 61 |....Debu|gPortSwa|
|000006f0| 70 28 4c 65 76 65 6c 29 | 3b 0d 0a 09 09 09 09 61 |p(Level)|;......a|
|00000700| 73 73 65 72 74 28 20 4f | 6c 64 51 75 65 72 79 50 |ssert( O|ldQueryP|
|00000710| 6f 72 74 4e 75 6d 62 65 | 72 20 3d 3d 20 62 6f 75 |ortNumbe|r == bou|
|00000720| 6e 64 70 6f 72 74 20 29 | 3b 0d 0a 09 09 09 7d 0d |ndport )|;.....}.|
|00000730| 0a 09 09 7d 0d 0a 09 09 | 4f 6c 64 51 75 65 72 79 |...}....|OldQuery|
|00000740| 50 6f 72 74 4e 75 6d 62 | 65 72 20 3d 20 62 6f 75 |PortNumb|er = bou|
|00000750| 6e 64 70 6f 72 74 3b 0d | 0a 09 09 53 61 76 65 43 |ndport;.|...SaveC|
|00000760| 6f 6e 66 69 67 28 29 3b | 0d 0a 09 7d 0d 0a 7d 0d |onfig();|...}..}.|
|00000770| 0a 0d 0a 73 74 61 74 69 | 63 20 66 75 6e 63 74 69 |...stati|c functi|
|00000780| 6f 6e 20 44 65 62 75 67 | 50 6f 72 74 53 77 61 70 |on Debug|PortSwap|
|00000790| 28 20 41 63 74 6f 72 20 | 52 65 66 20 29 0d 0a 7b |( Actor |Ref )..{|
|000007a0| 0d 0a 09 6c 6f 63 61 6c | 20 61 72 72 61 79 3c 55 |...local| array<U|
|000007b0| 64 70 47 61 6d 65 73 70 | 79 51 75 65 72 79 3e 20 |dpGamesp|yQuery> |
|000007c0| 51 75 65 72 69 65 73 3b | 0d 0a 09 6c 6f 63 61 6c |Queries;|...local|
|000007d0| 20 61 72 72 61 79 3c 4f | 62 6a 65 63 74 3e 20 52 | array<O|bject> R|
|000007e0| 65 66 65 72 65 6e 63 65 | 72 73 3b 0d 0a 09 6c 6f |eference|rs;...lo|
|000007f0| 63 61 6c 20 55 64 70 47 | 61 6d 65 73 70 79 51 75 |cal UdpG|amespyQu|
|00000800| 65 72 79 20 51 3b 0d 0a | 09 6c 6f 63 61 6c 20 69 |ery Q;..|.local i|
|00000810| 6e 74 20 69 2c 20 6a 3b | 0d 0a 09 6c 6f 63 61 6c |nt i, j;|...local|
|00000820| 20 73 74 72 69 6e 67 20 | 73 74 72 3b 0d 0a 0d 0a | string |str;....|
|00000830| 09 4c 6f 67 28 22 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.Log("**|********|
|00000840| 2a 2a 2a 2a 2a 22 29 3b | 0d 0a 09 4c 6f 67 28 22 |*****");|...Log("|
|00000850| 20 43 6f 6d 70 6c 65 74 | 65 20 4f 42 4a 20 4c 49 | Complet|e OBJ LI|
|00000860| 53 54 3a 22 29 3b 0d 0a | 0d 0a 09 52 65 66 2e 43 |ST:");..|...Ref.C|
|00000870| 6f 6e 73 6f 6c 65 43 6f | 6d 6d 61 6e 64 28 22 6f |onsoleCo|mmand("o|
|00000880| 62 6a 20 6c 69 73 74 22 | 2c 20 74 72 75 65 29 3b |bj list"|, true);|
|00000890| 0d 0a 09 4c 6f 67 28 22 | 2a 2a 2a 2a 2a 2a 2a 2a |...Log("|********|
|000008a0| 2a 2a 2a 2a 2a 2a 2a 22 | 29 3b 0d 0a 09 6c 6f 67 |*******"|);...log|
|000008b0| 28 22 22 29 3b 0d 0a 09 | 4c 6f 67 28 22 43 75 72 |("");...|Log("Cur|
|000008c0| 72 65 6e 74 20 55 64 70 | 47 61 6d 65 53 70 79 51 |rent Udp|GameSpyQ|
|000008d0| 75 65 72 79 20 6f 62 6a | 65 63 74 73 3a 22 29 3b |uery obj|ects:");|
|000008e0| 0d 0a 09 0d 0a 09 66 6f | 72 65 61 63 68 20 52 65 |......fo|reach Re|
|000008f0| 66 2e 41 6c 6c 4f 62 6a | 65 63 74 73 28 20 63 6c |f.AllObj|ects( cl|
|00000900| 61 73 73 27 55 64 70 47 | 61 6d 65 73 70 79 51 75 |ass'UdpG|amespyQu|
|00000910| 65 72 79 27 2c 20 51 20 | 29 0d 0a 09 09 51 75 65 |ery', Q |)....Que|
|00000920| 72 69 65 73 5b 51 75 65 | 72 69 65 73 2e 4c 65 6e |ries[Que|ries.Len|
|00000930| 67 74 68 5d 20 3d 20 51 | 3b 0d 0a 09 0d 0a 09 69 |gth] = Q|;......i|
|00000940| 66 20 28 20 51 75 65 72 | 69 65 73 2e 4c 65 6e 67 |f ( Quer|ies.Leng|
|00000950| 74 68 20 3d 3d 20 30 20 | 29 0d 0a 09 7b 0d 0a 09 |th == 0 |)...{...|
|00000960| 09 6c 6f 67 28 22 4e 6f | 20 55 64 70 47 61 6d 65 |.log("No| UdpGame|
|00000970| 73 70 79 51 75 65 72 79 | 20 6f 62 6a 65 63 74 73 |spyQuery| objects|
|00000980| 20 66 6f 75 6e 64 21 22 | 29 3b 0d 0a 09 09 72 65 | found!"|);....re|
|00000990| 74 75 72 6e 3b 0d 0a 09 | 7d 0d 0a 09 0d 0a 09 52 |turn;...|}......R|
|000009a0| 65 66 2e 43 6f 6e 73 6f | 6c 65 43 6f 6d 6d 61 6e |ef.Conso|leComman|
|000009b0| 64 28 22 6f 62 6a 20 6c | 69 73 74 20 63 6c 61 73 |d("obj l|ist clas|
|000009c0| 73 3d 75 64 70 67 61 6d | 65 73 70 79 71 75 65 72 |s=udpgam|espyquer|
|000009d0| 79 22 2c 20 74 72 75 65 | 29 3b 0d 0a 09 6c 6f 67 |y", true|);...log|
|000009e0| 28 22 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |("******|********|
|000009f0| 2a 22 29 3b 0d 0a 09 0d | 0a 09 6c 6f 67 28 22 54 |*");....|..log("T|
|00000a00| 72 61 63 69 6e 67 20 55 | 64 70 47 61 6d 65 73 70 |racing U|dpGamesp|
|00000a10| 79 51 75 65 72 79 20 6f | 62 6a 65 63 74 73 22 29 |yQuery o|bjects")|
|00000a20| 3b 0d 0a 09 66 6f 72 20 | 28 20 69 20 3d 20 30 3b |;...for |( i = 0;|
|00000a30| 20 69 20 3c 20 51 75 65 | 72 69 65 73 2e 4c 65 6e | i < Que|ries.Len|
|00000a40| 67 74 68 3b 20 69 2b 2b | 20 29 0d 0a 09 7b 0d 0a |gth; i++| )...{..|
|00000a50| 09 09 73 74 72 20 3d 20 | 47 65 74 46 75 6c 6c 4e |..str = |GetFullN|
|00000a60| 61 6d 65 28 51 75 65 72 | 69 65 73 5b 69 5d 29 3b |ame(Quer|ies[i]);|
|00000a70| 0d 0a 09 09 6c 6f 67 28 | 22 3d 3d 3d 3d 3d 3d 3d |....log(|"=======|
|00000a80| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000a90| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000aa0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000ab0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 22 29 3b 0d |========|====");.|
|00000ac0| 0a 09 09 4c 6f 67 28 22 | 20 52 65 66 65 72 65 6e |...Log("| Referen|
|00000ad0| 63 65 72 73 20 6f 66 20 | 27 22 24 73 74 72 24 22 |cers of |'"$str$"|
|00000ae0| 27 22 29 3b 0d 0a 09 09 | 52 65 66 2e 43 6f 6e 73 |'");....|Ref.Cons|
|00000af0| 6f 6c 65 43 6f 6d 6d 61 | 6e 64 28 22 6f 62 6a 20 |oleComma|nd("obj |
|00000b00| 72 65 66 73 20 63 6c 61 | 73 73 3d 75 64 70 67 61 |refs cla|ss=udpga|
|00000b10| 6d 65 73 70 79 71 75 65 | 72 79 20 6e 61 6d 65 3d |mespyque|ry name=|
|00000b20| 22 24 73 74 72 2c 20 74 | 72 75 65 29 3b 0d 0a 09 |"$str, t|rue);...|
|00000b30| 09 0d 0a 09 09 52 65 66 | 2e 47 65 74 52 65 66 65 |.....Ref|.GetRefe|
|00000b40| 72 65 6e 63 65 72 73 28 | 20 51 75 65 72 69 65 73 |rencers(| Queries|
|00000b50| 5b 69 5d 2c 20 52 65 66 | 65 72 65 6e 63 65 72 73 |[i], Ref|erencers|
|00000b60| 20 29 3b 0d 0a 09 09 66 | 6f 72 20 28 20 6a 20 3d | );....f|or ( j =|
|00000b70| 20 30 3b 20 6a 20 3c 20 | 52 65 66 65 72 65 6e 63 | 0; j < |Referenc|
|00000b80| 65 72 73 2e 4c 65 6e 67 | 74 68 3b 20 6a 2b 2b 20 |ers.Leng|th; j++ |
|00000b90| 29 0d 0a 09 09 7b 0d 0a | 09 09 09 69 66 20 28 20 |)....{..|...if ( |
|00000ba0| 4c 65 76 65 6c 28 52 65 | 66 65 72 65 6e 63 65 72 |Level(Re|ferencer|
|00000bb0| 73 5b 6a 5d 29 20 3d 3d | 20 4e 6f 6e 65 20 26 26 |s[j]) ==| None &&|
|00000bc0| 20 47 61 6d 65 45 6e 67 | 69 6e 65 28 52 65 66 65 | GameEng|ine(Refe|
|00000bd0| 72 65 6e 63 65 72 73 5b | 6a 5d 29 20 3d 3d 20 4e |rencers[|j]) == N|
|00000be0| 6f 6e 65 20 29 0d 0a 09 | 09 09 7b 0d 0a 09 09 09 |one )...|..{.....|
|00000bf0| 09 73 74 72 20 3d 20 47 | 65 74 46 75 6c 6c 4e 61 |.str = G|etFullNa|
|00000c00| 6d 65 28 52 65 66 65 72 | 65 6e 63 65 72 73 5b 6a |me(Refer|encers[j|
|00000c10| 5d 29 3b 0d 0a 09 09 09 | 09 6c 6f 67 28 22 22 29 |]);.....|.log("")|
|00000c20| 3b 0d 0a 09 09 09 09 6c | 6f 67 28 22 20 52 65 66 |;......l|og(" Ref|
|00000c30| 65 72 65 6e 63 65 72 73 | 20 6f 66 20 27 22 24 73 |erencers| of '"$s|
|00000c40| 74 72 24 22 27 22 29 3b | 0d 0a 09 09 09 09 52 65 |tr$"'");|......Re|
|00000c50| 66 2e 43 6f 6e 73 6f 6c | 65 43 6f 6d 6d 61 6e 64 |f.Consol|eCommand|
|00000c60| 28 22 6f 62 6a 20 72 65 | 66 73 20 63 6c 61 73 73 |("obj re|fs class|
|00000c70| 3d 22 24 52 65 66 65 72 | 65 6e 63 65 72 73 5b 6a |="$Refer|encers[j|
|00000c80| 5d 2e 43 6c 61 73 73 24 | 22 20 6e 61 6d 65 3d 22 |].Class$|" name="|
|00000c90| 24 73 74 72 2c 20 74 72 | 75 65 29 3b 0d 0a 09 09 |$str, tr|ue);....|
|00000ca0| 09 09 6c 6f 67 28 22 2a | 2a 2a 2a 2a 2a 2a 2a 2a |..log("*|********|
|00000cb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000cc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000cd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ce0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000cf0| 2a 22 29 3b 0d 0a 09 09 | 09 7d 0d 0a 09 09 7d 0d |*");....|.}....}.|
|00000d00| 0a 09 09 0d 0a 09 09 6c | 6f 67 28 22 3d 3d 3d 3d |.......l|og("====|
|00000d10| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000d20| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000d30| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000d40| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 22 |========|======="|
|00000d50| 29 3b 0d 0a 09 09 6c 6f | 67 28 22 22 29 3b 0d 0a |);....lo|g("");..|
|00000d60| 09 09 0d 0a 09 7d 0d 0a | 0d 0a 09 6c 6f 67 28 22 |.....}..|...log("|
|00000d70| 50 65 72 66 6f 72 6d 69 | 6e 67 20 67 61 72 62 61 |Performi|ng garba|
|00000d80| 67 65 20 63 6f 6c 6c 65 | 63 74 69 6f 6e 22 29 3b |ge colle|ction");|
|00000d90| 0d 0a 09 52 65 66 2e 43 | 6f 6e 73 6f 6c 65 43 6f |...Ref.C|onsoleCo|
|00000da0| 6d 6d 61 6e 64 28 22 6f | 62 6a 20 67 61 72 62 61 |mmand("o|bj garba|
|00000db0| 67 65 22 2c 20 74 72 75 | 65 29 3b 0d 0a 09 4c 6f |ge", tru|e);...Lo|
|00000dc0| 67 28 22 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |g("*****|********|
|00000dd0| 2a 2a 22 29 3b 0d 0a 09 | 4c 6f 67 28 22 52 65 6d |**");...|Log("Rem|
|00000de0| 61 69 6e 69 6e 67 20 55 | 64 70 47 61 6d 65 53 70 |aining U|dpGameSp|
|00000df0| 79 51 75 65 72 79 20 6f | 62 6a 65 63 74 73 3a 22 |yQuery o|bjects:"|
|00000e00| 29 3b 0d 0a 09 52 65 66 | 2e 43 6f 6e 73 6f 6c 65 |);...Ref|.Console|
|00000e10| 43 6f 6d 6d 61 6e 64 28 | 22 6f 62 6a 20 6c 69 73 |Command(|"obj lis|
|00000e20| 74 20 63 6c 61 73 73 3d | 75 64 70 67 61 6d 65 73 |t class=|udpgames|
|00000e30| 70 79 71 75 65 72 79 22 | 2c 20 74 72 75 65 29 3b |pyquery"|, true);|
|00000e40| 0d 0a 09 4c 6f 67 28 22 | 2a 2a 2a 2a 2a 2a 2a 2a |...Log("|********|
|00000e50| 2a 2a 2a 2a 2a 2a 2a 22 | 29 3b 0d 0a 7d 0d 0a 0d |*******"|);..}...|
|00000e60| 0a 73 74 61 74 69 63 20 | 66 75 6e 63 74 69 6f 6e |.static |function|
|00000e70| 20 73 74 72 69 6e 67 20 | 47 65 74 46 75 6c 6c 4e | string |GetFullN|
|00000e80| 61 6d 65 28 20 4f 62 6a | 65 63 74 20 4f 62 6a 20 |ame( Obj|ect Obj |
|00000e90| 29 0d 0a 7b 0d 0a 09 6c | 6f 63 61 6c 20 73 74 72 |)..{...l|ocal str|
|00000ea0| 69 6e 67 20 46 75 6c 6c | 4e 61 6d 65 3b 0d 0a 09 |ing Full|Name;...|
|00000eb0| 6c 6f 63 61 6c 20 61 72 | 72 61 79 3c 4f 62 6a 65 |local ar|ray<Obje|
|00000ec0| 63 74 3e 20 4f 75 74 65 | 72 73 3b 0d 0a 09 6c 6f |ct> Oute|rs;...lo|
|00000ed0| 63 61 6c 20 69 6e 74 20 | 69 3b 0d 0a 09 0d 0a 09 |cal int |i;......|
|00000ee0| 69 66 20 28 20 4f 62 6a | 20 3d 3d 20 4e 6f 6e 65 |if ( Obj| == None|
|00000ef0| 20 29 0d 0a 09 09 72 65 | 74 75 72 6e 20 22 22 3b | )....re|turn "";|
|00000f00| 0d 0a 09 09 0d 0a 09 4f | 75 74 65 72 73 5b 30 5d |.......O|uters[0]|
|00000f10| 20 3d 20 4f 62 6a 3b 0d | 0a 09 77 68 69 6c 65 20 | = Obj;.|..while |
|00000f20| 28 20 4f 75 74 65 72 73 | 5b 30 5d 2e 4f 75 74 65 |( Outers|[0].Oute|
|00000f30| 72 20 21 3d 20 4e 6f 6e | 65 20 29 0d 0a 09 7b 0d |r != Non|e )...{.|
|00000f40| 0a 09 09 4f 75 74 65 72 | 73 2e 49 6e 73 65 72 74 |...Outer|s.Insert|
|00000f50| 28 30 2c 20 31 29 3b 0d | 0a 09 09 4f 75 74 65 72 |(0, 1);.|...Outer|
|00000f60| 73 5b 30 5d 20 3d 20 4f | 75 74 65 72 73 5b 31 5d |s[0] = O|uters[1]|
|00000f70| 2e 4f 75 74 65 72 3b 0d | 0a 09 7d 0d 0a 09 0d 0a |.Outer;.|..}.....|
|00000f80| 09 66 6f 72 20 28 20 69 | 20 3d 20 30 3b 20 69 20 |.for ( i| = 0; i |
|00000f90| 3c 20 4f 75 74 65 72 73 | 2e 4c 65 6e 67 74 68 3b |< Outers|.Length;|
|00000fa0| 20 69 2b 2b 20 29 0d 0a | 09 7b 0d 0a 09 09 69 66 | i++ )..|.{....if|
|00000fb0| 20 28 20 46 75 6c 6c 4e | 61 6d 65 20 21 3d 20 22 | ( FullN|ame != "|
|00000fc0| 22 20 29 0d 0a 09 09 09 | 46 75 6c 6c 4e 61 6d 65 |" ).....|FullName|
|00000fd0| 20 24 3d 20 22 2e 22 3b | 0d 0a 09 09 09 0d 0a 09 | $= ".";|........|
|00000fe0| 09 46 75 6c 6c 4e 61 6d | 65 20 24 3d 20 4f 75 74 |.FullNam|e $= Out|
|00000ff0| 65 72 73 5b 69 5d 2e 4e | 61 6d 65 3b 0d 0a 09 7d |ers[i].N|ame;...}|
|00001000| 0d 0a 09 0d 0a 09 72 65 | 74 75 72 6e 20 46 75 6c |......re|turn Ful|
|00001010| 6c 4e 61 6d 65 3b 0d 0a | 7d 0d 0a 0d 0a 2f 2f 20 |lName;..|}....// |
|00001020| 52 65 63 65 69 76 65 64 | 20 61 20 71 75 65 72 79 |Received| a query|
|00001030| 20 72 65 71 75 65 73 74 | 2e 0d 0a 65 76 65 6e 74 | request|...event|
|00001040| 20 52 65 63 65 69 76 65 | 64 54 65 78 74 28 20 49 | Receive|dText( I|
|00001050| 70 41 64 64 72 20 41 64 | 64 72 2c 20 73 74 72 69 |pAddr Ad|dr, stri|
|00001060| 6e 67 20 54 65 78 74 20 | 29 0d 0a 7b 0d 0a 09 6c |ng Text |)..{...l|
|00001070| 6f 63 61 6c 20 73 74 72 | 69 6e 67 20 51 75 65 72 |ocal str|ing Quer|
|00001080| 79 3b 0d 0a 09 6c 6f 63 | 61 6c 20 62 6f 6f 6c 20 |y;...loc|al bool |
|00001090| 51 75 65 72 79 52 65 6d | 61 69 6e 69 6e 67 3b 0d |QueryRem|aining;.|
|000010a0| 0a 09 6c 6f 63 61 6c 20 | 69 6e 74 20 20 51 75 65 |..local |int Que|
|000010b0| 72 79 4e 75 6d 2c 20 50 | 61 63 6b 65 74 4e 75 6d |ryNum, P|acketNum|
|000010c0| 3b 0d 0a 0d 0a 09 2f 2f | 20 41 73 73 69 67 6e 20 |;.....//| Assign |
|000010d0| 74 68 69 73 20 70 61 63 | 6b 65 74 20 61 20 75 6e |this pac|ket a un|
|000010e0| 69 71 75 65 20 76 61 6c | 75 65 20 66 72 6f 6d 20 |ique val|ue from |
|000010f0| 31 20 74 6f 20 31 30 30 | 0d 0a 09 43 75 72 72 65 |1 to 100|...Curre|
|00001100| 6e 74 51 75 65 72 79 4e | 75 6d 2b 2b 3b 0d 0a 09 |ntQueryN|um++;...|
|00001110| 69 66 20 28 43 75 72 72 | 65 6e 74 51 75 65 72 79 |if (Curr|entQuery|
|00001120| 4e 75 6d 20 3e 20 31 30 | 30 29 0d 0a 09 09 43 75 |Num > 10|0)....Cu|
|00001130| 72 72 65 6e 74 51 75 65 | 72 79 4e 75 6d 20 3d 20 |rrentQue|ryNum = |
|00001140| 31 3b 0d 0a 09 51 75 65 | 72 79 4e 75 6d 20 3d 20 |1;...Que|ryNum = |
|00001150| 43 75 72 72 65 6e 74 51 | 75 65 72 79 4e 75 6d 3b |CurrentQ|ueryNum;|
|00001160| 0d 0a 0d 0a 09 51 75 65 | 72 79 20 3d 20 54 65 78 |.....Que|ry = Tex|
|00001170| 74 3b 0d 0a 09 69 66 20 | 28 51 75 65 72 79 20 3d |t;...if |(Query =|
|00001180| 3d 20 22 22 29 09 09 2f | 2f 20 49 66 20 74 68 65 |= "")../|/ If the|
|00001190| 20 73 74 72 69 6e 67 20 | 69 73 20 65 6d 70 74 79 | string |is empty|
|000011a0| 2c 20 64 6f 6e 27 74 20 | 70 61 72 73 65 20 69 74 |, don't |parse it|
|000011b0| 0d 0a 09 09 51 75 65 72 | 79 52 65 6d 61 69 6e 69 |....Quer|yRemaini|
|000011c0| 6e 67 20 3d 20 66 61 6c | 73 65 3b 0d 0a 09 65 6c |ng = fal|se;...el|
|000011d0| 73 65 0d 0a 09 09 51 75 | 65 72 79 52 65 6d 61 69 |se....Qu|eryRemai|
|000011e0| 6e 69 6e 67 20 3d 20 74 | 72 75 65 3b 0d 0a 09 2f |ning = t|rue;.../|
|000011f0| 2f 63 72 74 0d 0a 09 50 | 61 63 6b 65 74 4e 75 6d |/crt...P|acketNum|
|00001200| 20 3d 20 20 30 3b 0d 0a | 09 52 65 70 6c 79 44 61 | = 0;..|.ReplyDa|
|00001210| 74 61 20 3d 20 22 22 3b | 0d 0a 09 77 68 69 6c 65 |ta = "";|...while|
|00001220| 20 28 51 75 65 72 79 52 | 65 6d 61 69 6e 69 6e 67 | (QueryR|emaining|
|00001230| 29 20 7b 0d 0a 09 09 51 | 75 65 72 79 20 3d 20 50 |) {....Q|uery = P|
|00001240| 61 72 73 65 51 75 65 72 | 79 28 41 64 64 72 2c 20 |arseQuer|y(Addr, |
|00001250| 51 75 65 72 79 2c 20 51 | 75 65 72 79 4e 75 6d 2c |Query, Q|ueryNum,|
|00001260| 20 50 61 63 6b 65 74 4e | 75 6d 29 3b 0d 0a 09 09 | PacketN|um);....|
|00001270| 69 66 20 28 51 75 65 72 | 79 20 3d 3d 20 22 22 29 |if (Quer|y == "")|
|00001280| 0d 0a 09 09 09 51 75 65 | 72 79 52 65 6d 61 69 6e |.....Que|ryRemain|
|00001290| 69 6e 67 20 3d 20 66 61 | 6c 73 65 3b 0d 0a 09 09 |ing = fa|lse;....|
|000012a0| 65 6c 73 65 0d 0a 09 09 | 09 51 75 65 72 79 52 65 |else....|.QueryRe|
|000012b0| 6d 61 69 6e 69 6e 67 20 | 3d 20 74 72 75 65 3b 0d |maining |= true;.|
|000012c0| 0a 09 7d 0d 0a 7d 0d 0a | 0d 0a 66 75 6e 63 74 69 |..}..}..|..functi|
|000012d0| 6f 6e 20 62 6f 6f 6c 20 | 50 61 72 73 65 4e 65 78 |on bool |ParseNex|
|000012e0| 74 51 75 65 72 79 28 20 | 73 74 72 69 6e 67 20 51 |tQuery( |string Q|
|000012f0| 75 65 72 79 2c 20 6f 75 | 74 20 73 74 72 69 6e 67 |uery, ou|t string|
|00001300| 20 51 75 65 72 79 54 79 | 70 65 2c 20 6f 75 74 20 | QueryTy|pe, out |
|00001310| 73 74 72 69 6e 67 20 51 | 75 65 72 79 56 61 6c 75 |string Q|ueryValu|
|00001320| 65 2c 20 6f 75 74 20 73 | 74 72 69 6e 67 20 51 75 |e, out s|tring Qu|
|00001330| 65 72 79 52 65 73 74 2c | 20 6f 75 74 20 69 6e 74 |eryRest,| out int|
|00001340| 20 62 46 69 6e 61 6c 50 | 61 63 6b 65 74 20 29 0d | bFinalP|acket ).|
|00001350| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 73 74 72 69 6e |.{...loc|al strin|
|00001360| 67 20 54 65 6d 70 51 75 | 65 72 79 3b 0d 0a 09 6c |g TempQu|ery;...l|
|00001370| 6f 63 61 6c 20 69 6e 74 | 20 43 6c 6f 73 69 6e 67 |ocal int| Closing|
|00001380| 53 6c 61 73 68 3b 0d 0a | 0d 0a 09 69 66 20 28 51 |Slash;..|...if (Q|
|00001390| 75 65 72 79 20 3d 3d 20 | 22 22 29 0d 0a 09 09 72 |uery == |"")....r|
|000013a0| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 0a 0d 0a |eturn fa|lse;....|
|000013b0| 09 2f 2f 20 51 75 65 72 | 79 20 73 68 6f 75 6c 64 |.// Quer|y should|
|000013c0| 20 62 65 3a 0d 0a 09 2f | 2f 20 20 20 5c 5b 74 79 | be:.../|/ \[ty|
|000013d0| 70 65 5d 5c 3c 76 61 6c | 75 65 3e 0d 0a 09 69 66 |pe]\<val|ue>...if|
|000013e0| 20 28 4c 65 66 74 28 51 | 75 65 72 79 2c 20 31 29 | (Left(Q|uery, 1)|
|000013f0| 20 3d 3d 20 22 5c 5c 22 | 29 0d 0a 09 7b 0d 0a 09 | == "\\"|)...{...|
|00001400| 09 2f 2f 20 43 68 65 63 | 6b 20 74 6f 20 73 65 65 |.// Chec|k to see|
|00001410| 20 69 66 20 63 6c 6f 73 | 65 64 2e 0d 0a 09 09 43 | if clos|ed.....C|
|00001420| 6c 6f 73 69 6e 67 53 6c | 61 73 68 20 3d 20 49 6e |losingSl|ash = In|
|00001430| 53 74 72 28 52 69 67 68 | 74 28 51 75 65 72 79 2c |Str(Righ|t(Query,|
|00001440| 20 4c 65 6e 28 51 75 65 | 72 79 29 2d 31 29 2c 20 | Len(Que|ry)-1), |
|00001450| 22 5c 5c 22 29 3b 0d 0a | 09 09 69 66 20 28 43 6c |"\\");..|..if (Cl|
|00001460| 6f 73 69 6e 67 53 6c 61 | 73 68 20 3d 3d 20 30 29 |osingSla|sh == 0)|
|00001470| 0d 0a 09 09 09 72 65 74 | 75 72 6e 20 66 61 6c 73 |.....ret|urn fals|
|00001480| 65 3b 0d 0a 0d 0a 09 09 | 54 65 6d 70 51 75 65 72 |e;......|TempQuer|
|00001490| 79 20 3d 20 51 75 65 72 | 79 3b 0d 0a 0d 0a 09 09 |y = Quer|y;......|
|000014a0| 2f 2f 20 51 75 65 72 79 | 20 6c 6f 6f 6b 73 20 6c |// Query| looks l|
|000014b0| 69 6b 65 3a 0d 0a 09 09 | 2f 2f 20 20 5c 5b 74 79 |ike:....|// \[ty|
|000014c0| 70 65 5d 5c 0d 0a 09 09 | 51 75 65 72 79 54 79 70 |pe]\....|QueryTyp|
|000014d0| 65 20 3d 20 52 69 67 68 | 74 28 51 75 65 72 79 2c |e = Righ|t(Query,|
|000014e0| 20 4c 65 6e 28 51 75 65 | 72 79 29 2d 31 29 3b 0d | Len(Que|ry)-1);.|
|000014f0| 0a 09 09 51 75 65 72 79 | 54 79 70 65 20 3d 20 4c |...Query|Type = L|
|00001500| 65 66 74 28 51 75 65 72 | 79 54 79 70 65 2c 20 43 |eft(Quer|yType, C|
|00001510| 6c 6f 73 69 6e 67 53 6c | 61 73 68 29 3b 0d 0a 0d |losingSl|ash);...|
|00001520| 0a 09 09 51 75 65 72 79 | 52 65 73 74 20 3d 20 52 |...Query|Rest = R|
|00001530| 69 67 68 74 28 51 75 65 | 72 79 2c 20 4c 65 6e 28 |ight(Que|ry, Len(|
|00001540| 51 75 65 72 79 29 20 2d | 20 28 4c 65 6e 28 51 75 |Query) -| (Len(Qu|
|00001550| 65 72 79 54 79 70 65 29 | 20 2b 20 32 29 29 3b 0d |eryType)| + 2));.|
|00001560| 0a 0d 0a 09 09 69 66 20 | 28 28 51 75 65 72 79 52 |.....if |((QueryR|
|00001570| 65 73 74 20 3d 3d 20 22 | 22 29 20 7c 7c 20 28 4c |est == "|") || (L|
|00001580| 65 6e 28 51 75 65 72 79 | 52 65 73 74 29 20 3d 3d |en(Query|Rest) ==|
|00001590| 20 31 29 29 0d 0a 09 09 | 7b 0d 0a 09 09 09 62 46 | 1))....|{.....bF|
|000015a0| 69 6e 61 6c 50 61 63 6b | 65 74 20 3d 20 31 3b 0d |inalPack|et = 1;.|
|000015b0| 0a 09 09 09 72 65 74 75 | 72 6e 20 74 72 75 65 3b |....retu|rn true;|
|000015c0| 0d 0a 09 09 7d 20 65 6c | 73 65 20 69 66 20 28 4c |....} el|se if (L|
|000015d0| 65 66 74 28 51 75 65 72 | 79 52 65 73 74 2c 20 31 |eft(Quer|yRest, 1|
|000015e0| 29 20 3d 3d 20 22 5c 5c | 22 29 0d 0a 09 09 09 72 |) == "\\|").....r|
|000015f0| 65 74 75 72 6e 20 74 72 | 75 65 3b 09 2f 2f 20 5c |eturn tr|ue;.// \|
|00001600| 74 79 70 65 5c 5c 0d 0a | 0d 0a 09 09 2f 2f 20 51 |type\\..|....// Q|
|00001610| 75 65 72 79 20 6c 6f 6f | 6b 73 20 6c 69 6b 65 3a |uery loo|ks like:|
|00001620| 0d 0a 09 09 2f 2f 20 20 | 5c 74 79 70 65 5c 76 61 |....// |\type\va|
|00001630| 6c 75 65 0d 0a 09 09 43 | 6c 6f 73 69 6e 67 53 6c |lue....C|losingSl|
|00001640| 61 73 68 20 3d 20 49 6e | 53 74 72 28 51 75 65 72 |ash = In|Str(Quer|
|00001650| 79 52 65 73 74 2c 20 22 | 5c 5c 22 29 3b 0d 0a 09 |yRest, "|\\");...|
|00001660| 09 69 66 20 28 43 6c 6f | 73 69 6e 67 53 6c 61 73 |.if (Clo|singSlas|
|00001670| 68 20 3e 3d 20 30 29 0d | 0a 09 09 09 51 75 65 72 |h >= 0).|....Quer|
|00001680| 79 56 61 6c 75 65 20 3d | 20 4c 65 66 74 28 51 75 |yValue =| Left(Qu|
|00001690| 65 72 79 52 65 73 74 2c | 20 43 6c 6f 73 69 6e 67 |eryRest,| Closing|
|000016a0| 53 6c 61 73 68 29 3b 0d | 0a 09 09 65 6c 73 65 0d |Slash);.|...else.|
|000016b0| 0a 09 09 09 51 75 65 72 | 79 56 61 6c 75 65 20 3d |....Quer|yValue =|
|000016c0| 20 51 75 65 72 79 52 65 | 73 74 3b 0d 0a 0d 0a 09 | QueryRe|st;.....|
|000016d0| 09 51 75 65 72 79 52 65 | 73 74 20 3d 20 52 69 67 |.QueryRe|st = Rig|
|000016e0| 68 74 28 51 75 65 72 79 | 2c 20 4c 65 6e 28 51 75 |ht(Query|, Len(Qu|
|000016f0| 65 72 79 29 20 2d 20 28 | 4c 65 6e 28 51 75 65 72 |ery) - (|Len(Quer|
|00001700| 79 54 79 70 65 29 20 2b | 20 4c 65 6e 28 51 75 65 |yType) +| Len(Que|
|00001710| 72 79 56 61 6c 75 65 29 | 20 2b 20 33 29 29 3b 0d |ryValue)| + 3));.|
|00001720| 0a 09 09 69 66 20 28 51 | 75 65 72 79 52 65 73 74 |...if (Q|ueryRest|
|00001730| 20 3d 3d 20 22 22 29 0d | 0a 09 09 7b 0d 0a 09 09 | == "").|...{....|
|00001740| 09 62 46 69 6e 61 6c 50 | 61 63 6b 65 74 20 3d 20 |.bFinalP|acket = |
|00001750| 31 3b 0d 0a 09 09 09 72 | 65 74 75 72 6e 20 74 72 |1;.....r|eturn tr|
|00001760| 75 65 3b 0d 0a 09 09 7d | 20 65 6c 73 65 0d 0a 09 |ue;....}| else...|
|00001770| 09 09 72 65 74 75 72 6e | 20 74 72 75 65 3b 0d 0a |..return| true;..|
|00001780| 09 7d 20 65 6c 73 65 20 | 7b 0d 0a 09 09 72 65 74 |.} else |{....ret|
|00001790| 75 72 6e 20 66 61 6c 73 | 65 3b 0d 0a 09 7d 0d 0a |urn fals|e;...}..|
|000017a0| 7d 0d 0a 0d 0a 66 75 6e | 63 74 69 6f 6e 20 73 74 |}....fun|ction st|
|000017b0| 72 69 6e 67 20 50 61 72 | 73 65 51 75 65 72 79 28 |ring Par|seQuery(|
|000017c0| 20 49 70 41 64 64 72 20 | 41 64 64 72 2c 20 63 6f | IpAddr |Addr, co|
|000017d0| 65 72 63 65 20 73 74 72 | 69 6e 67 20 51 75 65 72 |erce str|ing Quer|
|000017e0| 79 2c 20 69 6e 74 20 51 | 75 65 72 79 4e 75 6d 2c |y, int Q|ueryNum,|
|000017f0| 20 6f 75 74 20 69 6e 74 | 20 50 61 63 6b 65 74 4e | out int| PacketN|
|00001800| 75 6d 20 29 0d 0a 7b 0d | 0a 09 6c 6f 63 61 6c 20 |um )..{.|..local |
|00001810| 73 74 72 69 6e 67 20 51 | 75 65 72 79 54 79 70 65 |string Q|ueryType|
|00001820| 2c 20 51 75 65 72 79 56 | 61 6c 75 65 2c 20 51 75 |, QueryV|alue, Qu|
|00001830| 65 72 79 52 65 73 74 2c | 20 56 61 6c 69 64 61 74 |eryRest,| Validat|
|00001840| 69 6f 6e 53 74 72 69 6e | 67 3b 0d 0a 09 6c 6f 63 |ionStrin|g;...loc|
|00001850| 61 6c 20 62 6f 6f 6c 20 | 52 65 73 75 6c 74 3b 0d |al bool |Result;.|
|00001860| 0a 09 6c 6f 63 61 6c 20 | 69 6e 74 20 62 46 69 6e |..local |int bFin|
|00001870| 61 6c 50 61 63 6b 65 74 | 3b 0d 0a 0d 0a 09 62 46 |alPacket|;.....bF|
|00001880| 69 6e 61 6c 50 61 63 6b | 65 74 20 3d 20 30 3b 0d |inalPack|et = 0;.|
|00001890| 0a 09 52 65 73 75 6c 74 | 20 3d 20 50 61 72 73 65 |..Result| = Parse|
|000018a0| 4e 65 78 74 51 75 65 72 | 79 28 51 75 65 72 79 2c |NextQuer|y(Query,|
|000018b0| 20 51 75 65 72 79 54 79 | 70 65 2c 20 51 75 65 72 | QueryTy|pe, Quer|
|000018c0| 79 56 61 6c 75 65 2c 20 | 51 75 65 72 79 52 65 73 |yValue, |QueryRes|
|000018d0| 74 2c 20 62 46 69 6e 61 | 6c 50 61 63 6b 65 74 29 |t, bFina|lPacket)|
|000018e0| 3b 0d 0a 09 69 66 28 20 | 21 52 65 73 75 6c 74 20 |;...if( |!Result |
|000018f0| 29 0d 0a 09 09 72 65 74 | 75 72 6e 20 22 22 3b 0d |)....ret|urn "";.|
|00001900| 0a 0d 0a 09 2f 2f 4c 6f | 67 28 22 47 6f 74 20 20 |....//Lo|g("Got |
|00001910| 51 75 65 72 79 3a 20 22 | 20 20 24 20 51 75 65 72 |Query: "| $ Quer|
|00001920| 79 4e 75 6d 20 24 20 22 | 2e 22 20 24 20 50 61 63 |yNum $ "|." $ Pac|
|00001930| 6b 65 74 4e 75 6d 20 24 | 20 22 3a 22 20 24 20 51 |ketNum $| ":" $ Q|
|00001940| 75 65 72 79 54 79 70 65 | 29 3b 0d 0a 0d 0a 09 69 |ueryType|);.....i|
|00001950| 66 28 20 51 75 65 72 79 | 54 79 70 65 3d 3d 22 62 |f( Query|Type=="b|
|00001960| 61 73 69 63 22 20 29 0d | 0a 09 7b 0d 0a 09 09 52 |asic" ).|..{....R|
|00001970| 65 73 75 6c 74 20 3d 20 | 53 65 6e 64 51 75 65 72 |esult = |SendQuer|
|00001980| 79 50 61 63 6b 65 74 28 | 41 64 64 72 2c 20 47 65 |yPacket(|Addr, Ge|
|00001990| 74 42 61 73 69 63 28 29 | 2c 20 51 75 65 72 79 4e |tBasic()|, QueryN|
|000019a0| 75 6d 2c 20 50 61 63 6b | 65 74 4e 75 6d 2c 20 62 |um, Pack|etNum, b|
|000019b0| 46 69 6e 61 6c 50 61 63 | 6b 65 74 29 3b 0d 0a 09 |FinalPac|ket);...|
|000019c0| 7d 0d 0a 09 65 6c 73 65 | 20 69 66 28 20 51 75 65 |}...else| if( Que|
|000019d0| 72 79 54 79 70 65 3d 3d | 22 69 6e 66 6f 22 20 29 |ryType==|"info" )|
|000019e0| 0d 0a 09 7b 0d 0a 09 09 | 52 65 73 75 6c 74 20 3d |...{....|Result =|
|000019f0| 20 53 65 6e 64 51 75 65 | 72 79 50 61 63 6b 65 74 | SendQue|ryPacket|
|00001a00| 28 41 64 64 72 2c 20 47 | 65 74 49 6e 66 6f 28 29 |(Addr, G|etInfo()|
|00001a10| 2c 20 51 75 65 72 79 4e | 75 6d 2c 20 50 61 63 6b |, QueryN|um, Pack|
|00001a20| 65 74 4e 75 6d 2c 20 62 | 46 69 6e 61 6c 50 61 63 |etNum, b|FinalPac|
|00001a30| 6b 65 74 29 3b 0d 0a 09 | 7d 0d 0a 09 65 6c 73 65 |ket);...|}...else|
|00001a40| 20 69 66 28 20 51 75 65 | 72 79 54 79 70 65 3d 3d | if( Que|ryType==|
|00001a50| 22 72 75 6c 65 73 22 20 | 29 0d 0a 09 7b 0d 0a 09 |"rules" |)...{...|
|00001a60| 09 52 65 73 75 6c 74 20 | 3d 20 53 65 6e 64 51 75 |.Result |= SendQu|
|00001a70| 65 72 79 50 61 63 6b 65 | 74 28 41 64 64 72 2c 20 |eryPacke|t(Addr, |
|00001a80| 47 65 74 52 75 6c 65 73 | 28 29 2c 20 51 75 65 72 |GetRules|(), Quer|
|00001a90| 79 4e 75 6d 2c 20 50 61 | 63 6b 65 74 4e 75 6d 2c |yNum, Pa|cketNum,|
|00001aa0| 20 62 46 69 6e 61 6c 50 | 61 63 6b 65 74 29 3b 0d | bFinalP|acket);.|
|00001ab0| 0a 09 7d 0d 0a 09 65 6c | 73 65 20 69 66 28 20 51 |..}...el|se if( Q|
|00001ac0| 75 65 72 79 54 79 70 65 | 3d 3d 22 70 6c 61 79 65 |ueryType|=="playe|
|00001ad0| 72 73 22 20 29 0d 0a 09 | 7b 0d 0a 09 09 69 66 28 |rs" )...|{....if(|
|00001ae0| 20 4c 65 76 65 6c 2e 47 | 61 6d 65 2e 4e 75 6d 50 | Level.G|ame.NumP|
|00001af0| 6c 61 79 65 72 73 20 3e | 20 30 20 29 0d 0a 09 09 |layers >| 0 )....|
|00001b00| 09 52 65 73 75 6c 74 20 | 3d 20 53 65 6e 64 50 6c |.Result |= SendPl|
|00001b10| 61 79 65 72 73 28 41 64 | 64 72 2c 20 51 75 65 72 |ayers(Ad|dr, Quer|
|00001b20| 79 4e 75 6d 2c 20 50 61 | 63 6b 65 74 4e 75 6d 2c |yNum, Pa|cketNum,|
|00001b30| 20 62 46 69 6e 61 6c 50 | 61 63 6b 65 74 29 3b 0d | bFinalP|acket);.|
|00001b40| 0a 09 09 65 6c 73 65 0d | 0a 09 09 09 52 65 73 75 |...else.|....Resu|
|00001b50| 6c 74 20 3d 20 53 65 6e | 64 51 75 65 72 79 50 61 |lt = Sen|dQueryPa|
|00001b60| 63 6b 65 74 28 41 64 64 | 72 2c 20 22 22 2c 20 51 |cket(Add|r, "", Q|
|00001b70| 75 65 72 79 4e 75 6d 2c | 20 50 61 63 6b 65 74 4e |ueryNum,| PacketN|
|00001b80| 75 6d 2c 20 62 46 69 6e | 61 6c 50 61 63 6b 65 74 |um, bFin|alPacket|
|00001b90| 29 3b 0d 0a 09 7d 0d 0a | 09 65 6c 73 65 20 69 66 |);...}..|.else if|
|00001ba0| 28 20 51 75 65 72 79 54 | 79 70 65 3d 3d 22 73 74 |( QueryT|ype=="st|
|00001bb0| 61 74 75 73 22 20 29 0d | 0a 09 7b 0d 0a 09 09 52 |atus" ).|..{....R|
|00001bc0| 65 73 75 6c 74 20 3d 20 | 53 65 6e 64 51 75 65 72 |esult = |SendQuer|
|00001bd0| 79 50 61 63 6b 65 74 28 | 41 64 64 72 2c 20 47 65 |yPacket(|Addr, Ge|
|00001be0| 74 42 61 73 69 63 28 29 | 2c 20 51 75 65 72 79 4e |tBasic()|, QueryN|
|00001bf0| 75 6d 2c 20 50 61 63 6b | 65 74 4e 75 6d 2c 20 30 |um, Pack|etNum, 0|
|00001c00| 29 3b 0d 0a 09 09 52 65 | 73 75 6c 74 20 3d 20 53 |);....Re|sult = S|
|00001c10| 65 6e 64 51 75 65 72 79 | 50 61 63 6b 65 74 28 41 |endQuery|Packet(A|
|00001c20| 64 64 72 2c 20 47 65 74 | 49 6e 66 6f 28 29 2c 20 |ddr, Get|Info(), |
|00001c30| 51 75 65 72 79 4e 75 6d | 2c 20 50 61 63 6b 65 74 |QueryNum|, Packet|
|00001c40| 4e 75 6d 2c 20 30 29 3b | 0d 0a 09 09 69 66 28 20 |Num, 0);|....if( |
|00001c50| 4c 65 76 65 6c 2e 47 61 | 6d 65 2e 4e 75 6d 50 6c |Level.Ga|me.NumPl|
|00001c60| 61 79 65 72 73 20 3d 3d | 20 30 20 29 0d 0a 09 09 |ayers ==| 0 )....|
|00001c70| 7b 0d 0a 09 09 09 52 65 | 73 75 6c 74 20 3d 20 53 |{.....Re|sult = S|
|00001c80| 65 6e 64 51 75 65 72 79 | 50 61 63 6b 65 74 28 41 |endQuery|Packet(A|
|00001c90| 64 64 72 2c 20 47 65 74 | 52 75 6c 65 73 28 29 2c |ddr, Get|Rules(),|
|00001ca0| 20 51 75 65 72 79 4e 75 | 6d 2c 20 50 61 63 6b 65 | QueryNu|m, Packe|
|00001cb0| 74 4e 75 6d 2c 20 62 46 | 69 6e 61 6c 50 61 63 6b |tNum, bF|inalPack|
|00001cc0| 65 74 29 3b 0d 0a 09 09 | 7d 0d 0a 09 09 65 6c 73 |et);....|}....els|
|00001cd0| 65 0d 0a 09 09 7b 0d 0a | 09 09 09 52 65 73 75 6c |e....{..|...Resul|
|00001ce0| 74 20 3d 20 53 65 6e 64 | 51 75 65 72 79 50 61 63 |t = Send|QueryPac|
|00001cf0| 6b 65 74 28 41 64 64 72 | 2c 20 47 65 74 52 75 6c |ket(Addr|, GetRul|
|00001d00| 65 73 28 29 2c 20 51 75 | 65 72 79 4e 75 6d 2c 20 |es(), Qu|eryNum, |
|00001d10| 50 61 63 6b 65 74 4e 75 | 6d 2c 20 30 29 3b 0d 0a |PacketNu|m, 0);..|
|00001d20| 09 09 09 52 65 73 75 6c | 74 20 3d 20 53 65 6e 64 |...Resul|t = Send|
|00001d30| 50 6c 61 79 65 72 73 28 | 41 64 64 72 2c 20 51 75 |Players(|Addr, Qu|
|00001d40| 65 72 79 4e 75 6d 2c 20 | 50 61 63 6b 65 74 4e 75 |eryNum, |PacketNu|
|00001d50| 6d 2c 20 62 46 69 6e 61 | 6c 50 61 63 6b 65 74 29 |m, bFina|lPacket)|
|00001d60| 3b 0d 0a 09 09 7d 0d 0a | 09 7d 0d 0a 09 65 6c 73 |;....}..|.}...els|
|00001d70| 65 20 69 66 28 20 51 75 | 65 72 79 54 79 70 65 3d |e if( Qu|eryType=|
|00001d80| 3d 22 65 63 68 6f 22 20 | 29 0d 0a 09 7b 0d 0a 09 |="echo" |)...{...|
|00001d90| 09 2f 2f 20 52 65 73 70 | 6f 6e 64 20 74 6f 20 61 |.// Resp|ond to a|
|00001da0| 6e 20 65 63 68 6f 20 77 | 69 74 68 20 74 68 65 20 |n echo w|ith the |
|00001db0| 73 61 6d 65 20 73 74 72 | 69 6e 67 0d 0a 09 09 2f |same str|ing..../|
|00001dc0| 2f 21 21 20 64 69 73 61 | 62 6c 65 64 20 64 75 65 |/!! disa|bled due|
|00001dd0| 20 74 6f 20 73 65 63 75 | 72 69 74 79 20 70 72 6f | to secu|rity pro|
|00001de0| 62 6c 65 6d 20 2d 20 74 | 68 65 20 72 65 6d 6f 74 |blem - t|he remot|
|00001df0| 65 20 69 70 2f 70 6f 72 | 74 20 63 6f 75 6c 64 20 |e ip/por|t could |
|00001e00| 62 65 20 73 70 6f 6f 66 | 65 64 20 74 6f 20 63 61 |be spoof|ed to ca|
|00001e10| 75 73 65 20 61 6e 20 65 | 63 68 6f 20 6c 6f 6f 70 |use an e|cho loop|
|00001e20| 21 0d 0a 09 09 52 65 73 | 75 6c 74 20 3d 20 53 65 |!....Res|ult = Se|
|00001e30| 6e 64 51 75 65 72 79 50 | 61 63 6b 65 74 28 41 64 |ndQueryP|acket(Ad|
|00001e40| 64 72 2c 20 22 5c 5c 69 | 67 6e 6f 72 69 6e 67 5c |dr, "\\i|gnoring\|
|00001e50| 5c 22 24 51 75 65 72 79 | 56 61 6c 75 65 2c 20 51 |\"$Query|Value, Q|
|00001e60| 75 65 72 79 4e 75 6d 2c | 20 50 61 63 6b 65 74 4e |ueryNum,| PacketN|
|00001e70| 75 6d 2c 20 62 46 69 6e | 61 6c 50 61 63 6b 65 74 |um, bFin|alPacket|
|00001e80| 29 3b 0d 0a 09 7d 0d 0a | 09 65 6c 73 65 20 69 66 |);...}..|.else if|
|00001e90| 28 20 51 75 65 72 79 54 | 79 70 65 3d 3d 22 73 65 |( QueryT|ype=="se|
|00001ea0| 63 75 72 65 22 20 29 0d | 0a 09 7b 0d 0a 09 09 56 |cure" ).|..{....V|
|00001eb0| 61 6c 69 64 61 74 69 6f | 6e 53 74 72 69 6e 67 20 |alidatio|nString |
|00001ec0| 3d 20 22 5c 5c 76 61 6c | 69 64 61 74 65 5c 5c 22 |= "\\val|idate\\"|
|00001ed0| 24 47 61 6d 65 53 70 79 | 56 61 6c 69 64 61 74 65 |$GameSpy|Validate|
|00001ee0| 28 51 75 65 72 79 56 61 | 6c 75 65 29 3b 0d 0a 09 |(QueryVa|lue);...|
|00001ef0| 09 52 65 73 75 6c 74 20 | 3d 20 53 65 6e 64 51 75 |.Result |= SendQu|
|00001f00| 65 72 79 50 61 63 6b 65 | 74 28 41 64 64 72 2c 20 |eryPacke|t(Addr, |
|00001f10| 56 61 6c 69 64 61 74 69 | 6f 6e 53 74 72 69 6e 67 |Validati|onString|
|00001f20| 2c 20 51 75 65 72 79 4e | 75 6d 2c 20 50 61 63 6b |, QueryN|um, Pack|
|00001f30| 65 74 4e 75 6d 2c 20 62 | 46 69 6e 61 6c 50 61 63 |etNum, b|FinalPac|
|00001f40| 6b 65 74 29 3b 0d 0a 09 | 7d 0d 0a 09 65 6c 73 65 |ket);...|}...else|
|00001f50| 20 69 66 28 20 51 75 65 | 72 79 54 79 70 65 3d 3d | if( Que|ryType==|
|00001f60| 22 6c 65 76 65 6c 5f 70 | 72 6f 70 65 72 74 79 22 |"level_p|roperty"|
|00001f70| 20 29 0d 0a 09 7b 0d 0a | 09 09 52 65 73 75 6c 74 | )...{..|..Result|
|00001f80| 20 3d 20 53 65 6e 64 51 | 75 65 72 79 50 61 63 6b | = SendQ|ueryPack|
|00001f90| 65 74 28 41 64 64 72 2c | 20 47 65 74 4c 65 76 65 |et(Addr,| GetLeve|
|00001fa0| 6c 50 72 6f 70 65 72 74 | 79 28 51 75 65 72 79 56 |lPropert|y(QueryV|
|00001fb0| 61 6c 75 65 29 2c 20 51 | 75 65 72 79 4e 75 6d 2c |alue), Q|ueryNum,|
|00001fc0| 20 50 61 63 6b 65 74 4e | 75 6d 2c 20 62 46 69 6e | PacketN|um, bFin|
|00001fd0| 61 6c 50 61 63 6b 65 74 | 29 3b 0d 0a 09 7d 0d 0a |alPacket|);...}..|
|00001fe0| 09 65 6c 73 65 20 69 66 | 28 20 51 75 65 72 79 54 |.else if|( QueryT|
|00001ff0| 79 70 65 3d 3d 22 67 61 | 6d 65 5f 70 72 6f 70 65 |ype=="ga|me_prope|
|00002000| 72 74 79 22 20 29 0d 0a | 09 7b 0d 0a 09 09 09 52 |rty" )..|.{.....R|
|00002010| 65 73 75 6c 74 20 3d 20 | 53 65 6e 64 51 75 65 72 |esult = |SendQuer|
|00002020| 79 50 61 63 6b 65 74 28 | 41 64 64 72 2c 20 47 65 |yPacket(|Addr, Ge|
|00002030| 74 47 61 6d 65 50 72 6f | 70 65 72 74 79 28 51 75 |tGamePro|perty(Qu|
|00002040| 65 72 79 56 61 6c 75 65 | 29 2c 20 51 75 65 72 79 |eryValue|), Query|
|00002050| 4e 75 6d 2c 20 50 61 63 | 6b 65 74 4e 75 6d 2c 20 |Num, Pac|ketNum, |
|00002060| 62 46 69 6e 61 6c 50 61 | 63 6b 65 74 29 3b 0d 0a |bFinalPa|cket);..|
|00002070| 09 7d 0d 0a 09 65 6c 73 | 65 20 69 66 28 20 51 75 |.}...els|e if( Qu|
|00002080| 65 72 79 54 79 70 65 3d | 3d 22 70 6c 61 79 65 72 |eryType=|="player|
|00002090| 5f 70 72 6f 70 65 72 74 | 79 22 20 29 0d 0a 09 7b |_propert|y" )...{|
|000020a0| 0d 0a 09 09 52 65 73 75 | 6c 74 20 3d 20 53 65 6e |....Resu|lt = Sen|
|000020b0| 64 51 75 65 72 79 50 61 | 63 6b 65 74 28 41 64 64 |dQueryPa|cket(Add|
|000020c0| 72 2c 20 47 65 74 50 6c | 61 79 65 72 50 72 6f 70 |r, GetPl|ayerProp|
|000020d0| 65 72 74 79 28 51 75 65 | 72 79 56 61 6c 75 65 29 |erty(Que|ryValue)|
|000020e0| 2c 20 51 75 65 72 79 4e | 75 6d 2c 20 50 61 63 6b |, QueryN|um, Pack|
|000020f0| 65 74 4e 75 6d 2c 20 62 | 46 69 6e 61 6c 50 61 63 |etNum, b|FinalPac|
|00002100| 6b 65 74 29 3b 0d 0a 09 | 7d 0d 0a 09 72 65 74 75 |ket);...|}...retu|
|00002110| 72 6e 20 51 75 65 72 79 | 52 65 73 74 3b 0d 0a 7d |rn Query|Rest;..}|
|00002120| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 62 6f 6f |....func|tion boo|
|00002130| 6c 20 53 65 6e 64 41 50 | 61 63 6b 65 74 28 49 70 |l SendAP|acket(Ip|
|00002140| 41 64 64 72 20 41 64 64 | 72 2c 20 69 6e 74 20 51 |Addr Add|r, int Q|
|00002150| 75 65 72 79 4e 75 6d 2c | 20 6f 75 74 20 69 6e 74 |ueryNum,| out int|
|00002160| 20 50 61 63 6b 65 74 4e | 75 6d 2c 20 69 6e 74 20 | PacketN|um, int |
|00002170| 62 46 69 6e 61 6c 50 61 | 63 6b 65 74 29 0d 0a 7b |bFinalPa|cket)..{|
|00002180| 0d 0a 09 6c 6f 63 61 6c | 20 62 6f 6f 6c 20 52 65 |...local| bool Re|
|00002190| 73 75 6c 74 3b 0d 0a 0d | 0a 09 52 65 70 6c 79 44 |sult;...|..ReplyD|
|000021a0| 61 74 61 20 3d 20 52 65 | 70 6c 79 44 61 74 61 24 |ata = Re|plyData$|
|000021b0| 22 5c 5c 71 75 65 72 79 | 69 64 5c 5c 22 24 51 75 |"\\query|id\\"$Qu|
|000021c0| 65 72 79 4e 75 6d 24 22 | 2e 22 24 2b 2b 50 61 63 |eryNum$"|."$++Pac|
|000021d0| 6b 65 74 4e 75 6d 3b 0d | 0a 09 69 66 20 28 62 46 |ketNum;.|..if (bF|
|000021e0| 69 6e 61 6c 50 61 63 6b | 65 74 20 3d 3d 20 31 29 |inalPack|et == 1)|
|000021f0| 20 7b 0d 0a 09 09 52 65 | 70 6c 79 44 61 74 61 20 | {....Re|plyData |
|00002200| 3d 20 52 65 70 6c 79 44 | 61 74 61 20 24 20 22 5c |= ReplyD|ata $ "\|
|00002210| 5c 66 69 6e 61 6c 5c 5c | 22 3b 0d 0a 09 7d 0d 0a |\final\\|";...}..|
|00002220| 09 52 65 73 75 6c 74 20 | 3d 20 53 65 6e 64 54 65 |.Result |= SendTe|
|00002230| 78 74 28 41 64 64 72 2c | 20 52 65 70 6c 79 44 61 |xt(Addr,| ReplyDa|
|00002240| 74 61 29 3b 0d 0a 09 52 | 65 70 6c 79 44 61 74 61 |ta);...R|eplyData|
|00002250| 20 3d 20 22 22 3b 0d 0a | 0d 0a 09 72 65 74 75 72 | = "";..|...retur|
|00002260| 6e 20 52 65 73 75 6c 74 | 3b 0d 0a 0d 0a 7d 0d 0a |n Result|;....}..|
|00002270| 0d 0a 2f 2f 20 53 65 6e | 64 51 75 65 72 79 50 61 |..// Sen|dQueryPa|
|00002280| 63 6b 65 74 20 69 73 20 | 61 20 77 72 61 70 70 65 |cket is |a wrappe|
|00002290| 72 20 66 6f 72 20 53 65 | 6e 64 54 65 78 74 20 74 |r for Se|ndText t|
|000022a0| 68 61 74 20 61 6c 6c 6f | 77 73 20 66 6f 72 20 70 |hat allo|ws for p|
|000022b0| 61 63 6b 65 74 20 6e 75 | 6d 62 65 72 69 6e 67 2e |acket nu|mbering.|
|000022c0| 0d 0a 66 75 6e 63 74 69 | 6f 6e 20 62 6f 6f 6c 20 |..functi|on bool |
|000022d0| 53 65 6e 64 51 75 65 72 | 79 50 61 63 6b 65 74 28 |SendQuer|yPacket(|
|000022e0| 49 70 41 64 64 72 20 41 | 64 64 72 2c 20 63 6f 65 |IpAddr A|ddr, coe|
|000022f0| 72 63 65 20 73 74 72 69 | 6e 67 20 53 65 6e 64 53 |rce stri|ng SendS|
|00002300| 74 72 69 6e 67 2c 20 69 | 6e 74 20 51 75 65 72 79 |tring, i|nt Query|
|00002310| 4e 75 6d 2c 20 6f 75 74 | 20 69 6e 74 20 50 61 63 |Num, out| int Pac|
|00002320| 6b 65 74 4e 75 6d 2c 20 | 69 6e 74 20 62 46 69 6e |ketNum, |int bFin|
|00002330| 61 6c 50 61 63 6b 65 74 | 29 0d 0a 7b 0d 0a 09 6c |alPacket|)..{...l|
|00002340| 6f 63 61 6c 20 62 6f 6f | 6c 20 52 65 73 75 6c 74 |ocal boo|l Result|
|00002350| 3b 0d 0a 0d 0a 09 2f 2f | 4c 6f 67 28 22 53 65 6e |;.....//|Log("Sen|
|00002360| 64 20 51 75 65 72 79 3a | 20 22 20 20 24 20 51 75 |d Query:| " $ Qu|
|00002370| 65 72 79 4e 75 6d 20 24 | 20 22 2e 22 20 24 20 50 |eryNum $| "." $ P|
|00002380| 61 63 6b 65 74 4e 75 6d | 20 24 20 22 3a 22 20 24 |acketNum| $ ":" $|
|00002390| 20 62 46 69 6e 61 6c 50 | 61 63 6b 65 74 29 3b 0d | bFinalP|acket);.|
|000023a0| 0a 09 72 65 73 75 6c 74 | 20 3d 20 74 72 75 65 3b |..result| = true;|
|000023b0| 0d 0a 09 69 66 20 28 6c | 65 6e 28 52 65 70 6c 79 |...if (l|en(Reply|
|000023c0| 44 61 74 61 29 20 2b 20 | 6c 65 6e 28 53 65 6e 64 |Data) + |len(Send|
|000023d0| 53 74 72 69 6e 67 29 20 | 3e 20 31 30 30 30 29 0d |String) |> 1000).|
|000023e0| 0a 09 09 72 65 73 75 6c | 74 20 3d 20 53 65 6e 64 |...resul|t = Send|
|000023f0| 41 50 61 63 6b 65 74 28 | 41 64 64 72 2c 20 51 75 |APacket(|Addr, Qu|
|00002400| 65 72 79 4e 75 6d 2c 20 | 50 61 63 6b 65 74 4e 75 |eryNum, |PacketNu|
|00002410| 6d 2c 20 30 29 3b 0d 0a | 0d 0a 09 52 65 70 6c 79 |m, 0);..|...Reply|
|00002420| 44 61 74 61 20 3d 20 52 | 65 70 6c 79 44 61 74 61 |Data = R|eplyData|
|00002430| 20 24 20 53 65 6e 64 53 | 74 72 69 6e 67 3b 0d 0a | $ SendS|tring;..|
|00002440| 0d 0a 09 69 66 20 28 62 | 46 69 6e 61 6c 50 61 63 |...if (b|FinalPac|
|00002450| 6b 65 74 20 3d 3d 20 31 | 29 0d 0a 09 09 72 65 73 |ket == 1|)....res|
|00002460| 75 6c 74 20 3d 20 53 65 | 6e 64 41 50 61 63 6b 65 |ult = Se|ndAPacke|
|00002470| 74 28 41 64 64 72 2c 20 | 51 75 65 72 79 4e 75 6d |t(Addr, |QueryNum|
|00002480| 2c 20 50 61 63 6b 65 74 | 4e 75 6d 2c 20 62 46 69 |, Packet|Num, bFi|
|00002490| 6e 61 6c 50 61 63 6b 65 | 74 29 3b 0d 0a 0d 0a 09 |nalPacke|t);.....|
|000024a0| 72 65 74 75 72 6e 20 52 | 65 73 75 6c 74 3b 0d 0a |return R|esult;..|
|000024b0| 7d 0d 0a 0d 0a 2f 2f 20 | 52 65 74 75 72 6e 20 61 |}....// |Return a|
|000024c0| 20 73 74 72 69 6e 67 20 | 6f 66 20 62 61 73 69 63 | string |of basic|
|000024d0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 2e 0d 0a 66 | informa|tion...f|
|000024e0| 75 6e 63 74 69 6f 6e 20 | 73 74 72 69 6e 67 20 47 |unction |string G|
|000024f0| 65 74 42 61 73 69 63 28 | 29 20 7b 0d 0a 09 6c 6f |etBasic(|) {...lo|
|00002500| 63 61 6c 20 73 74 72 69 | 6e 67 20 52 65 73 75 6c |cal stri|ng Resul|
|00002510| 74 53 65 74 3b 0d 0a 0d | 0a 09 2f 2f 20 54 68 65 |tSet;...|..// The|
|00002520| 20 6e 61 6d 65 20 6f 66 | 20 74 68 69 73 20 67 61 | name of| this ga|
|00002530| 6d 65 2e 0d 0a 09 52 65 | 73 75 6c 74 53 65 74 20 |me....Re|sultSet |
|00002540| 3d 20 22 5c 5c 67 61 6d | 65 6e 61 6d 65 5c 5c 22 |= "\\gam|ename\\"|
|00002550| 24 47 61 6d 65 53 70 79 | 47 61 6d 65 4e 61 6d 65 |$GameSpy|GameName|
|00002560| 28 29 3b 0d 0a 0d 0a 09 | 2f 2f 20 54 68 65 20 76 |();.....|// The v|
|00002570| 65 72 73 69 6f 6e 20 6f | 66 20 74 68 69 73 20 67 |ersion o|f this g|
|00002580| 61 6d 65 2e 0d 0a 09 52 | 65 73 75 6c 74 53 65 74 |ame....R|esultSet|
|00002590| 20 3d 20 52 65 73 75 6c | 74 53 65 74 24 22 5c 5c | = Resul|tSet$"\\|
|000025a0| 67 61 6d 65 76 65 72 5c | 5c 22 24 4c 65 76 65 6c |gamever\|\"$Level|
|000025b0| 2e 45 6e 67 69 6e 65 56 | 65 72 73 69 6f 6e 3b 0d |.EngineV|ersion;.|
|000025c0| 0a 0d 0a 09 2f 2f 20 54 | 68 65 20 6d 6f 73 74 20 |....// T|he most |
|000025d0| 72 65 63 65 6e 74 20 6e | 65 74 77 6f 72 6b 20 63 |recent n|etwork c|
|000025e0| 6f 6d 70 61 74 69 62 6c | 65 20 76 65 72 73 69 6f |ompatibl|e versio|
|000025f0| 6e 2e 0d 0a 09 69 66 28 | 20 4d 69 6e 4e 65 74 56 |n....if(| MinNetV|
|00002600| 65 72 20 3e 3d 20 49 6e | 74 28 4c 65 76 65 6c 2e |er >= In|t(Level.|
|00002610| 4d 69 6e 4e 65 74 56 65 | 72 73 69 6f 6e 29 20 26 |MinNetVe|rsion) &|
|00002620| 26 0d 0a 09 09 4d 69 6e | 4e 65 74 56 65 72 20 3c |&....Min|NetVer <|
|00002630| 3d 20 49 6e 74 28 4c 65 | 76 65 6c 2e 45 6e 67 69 |= Int(Le|vel.Engi|
|00002640| 6e 65 56 65 72 73 69 6f | 6e 29 20 29 0d 0a 09 09 |neVersio|n) )....|
|00002650| 52 65 73 75 6c 74 53 65 | 74 20 3d 20 52 65 73 75 |ResultSe|t = Resu|
|00002660| 6c 74 53 65 74 24 22 5c | 5c 6d 69 6e 6e 65 74 76 |ltSet$"\|\minnetv|
|00002670| 65 72 5c 5c 22 24 73 74 | 72 69 6e 67 28 4d 69 6e |er\\"$st|ring(Min|
|00002680| 4e 65 74 56 65 72 29 3b | 0d 0a 09 65 6c 73 65 0d |NetVer);|...else.|
|00002690| 0a 09 09 52 65 73 75 6c | 74 53 65 74 20 3d 20 52 |...Resul|tSet = R|
|000026a0| 65 73 75 6c 74 53 65 74 | 24 22 5c 5c 6d 69 6e 6e |esultSet|$"\\minn|
|000026b0| 65 74 76 65 72 5c 5c 22 | 24 4c 65 76 65 6c 2e 4d |etver\\"|$Level.M|
|000026c0| 69 6e 4e 65 74 56 65 72 | 73 69 6f 6e 3b 0d 0a 0d |inNetVer|sion;...|
|000026d0| 0a 09 2f 2f 20 54 68 65 | 20 72 65 67 69 6f 6e 61 |..// The| regiona|
|000026e0| 6c 20 6c 6f 63 61 74 69 | 6f 6e 20 6f 66 20 74 68 |l locati|on of th|
|000026f0| 69 73 20 67 61 6d 65 2e | 0d 0a 09 52 65 73 75 6c |is game.|...Resul|
|00002700| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00002710| 24 22 5c 5c 6c 6f 63 61 | 74 69 6f 6e 5c 5c 22 24 |$"\\loca|tion\\"$|
|00002720| 63 6c 61 73 73 27 55 64 | 70 47 61 6d 65 73 70 79 |class'Ud|pGamespy|
|00002730| 55 70 6c 69 6e 6b 27 2e | 64 65 66 61 75 6c 74 2e |Uplink'.|default.|
|00002740| 53 65 72 76 65 72 52 65 | 67 69 6f 6e 3b 0d 0a 0d |ServerRe|gion;...|
|00002750| 0a 09 72 65 74 75 72 6e | 20 52 65 73 75 6c 74 53 |..return| ResultS|
|00002760| 65 74 3b 0d 0a 7d 0d 0a | 0d 0a 2f 2f 20 52 65 74 |et;..}..|..// Ret|
|00002770| 75 72 6e 20 61 20 73 74 | 72 69 6e 67 20 6f 66 20 |urn a st|ring of |
|00002780| 69 6d 70 6f 72 74 61 6e | 74 20 73 79 73 74 65 6d |importan|t system|
|00002790| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 2e 0d 0a 66 | informa|tion...f|
|000027a0| 75 6e 63 74 69 6f 6e 20 | 73 74 72 69 6e 67 20 47 |unction |string G|
|000027b0| 65 74 49 6e 66 6f 28 29 | 20 7b 0d 0a 09 6c 6f 63 |etInfo()| {...loc|
|000027c0| 61 6c 20 73 74 72 69 6e | 67 20 52 65 73 75 6c 74 |al strin|g Result|
|000027d0| 53 65 74 3b 0d 0a 09 6c | 6f 63 61 6c 20 73 74 72 |Set;...l|ocal str|
|000027e0| 69 6e 67 20 53 65 72 76 | 65 72 4e 61 6d 65 3b 0d |ing Serv|erName;.|
|000027f0| 0a 0d 0a 09 53 65 72 76 | 65 72 4e 61 6d 65 20 3d |....Serv|erName =|
|00002800| 20 4c 65 76 65 6c 2e 47 | 61 6d 65 2e 47 61 6d 65 | Level.G|ame.Game|
|00002810| 52 65 70 6c 69 63 61 74 | 69 6f 6e 49 6e 66 6f 2e |Replicat|ionInfo.|
|00002820| 53 65 72 76 65 72 4e 61 | 6d 65 3b 0d 0a 09 52 65 |ServerNa|me;...Re|
|00002830| 70 6c 61 63 65 54 65 78 | 74 28 53 65 72 76 65 72 |placeTex|t(Server|
|00002840| 4e 61 6d 65 2c 22 5c 5c | 22 2c 22 22 29 3b 09 2f |Name,"\\|","");./|
|00002850| 2f 20 73 74 72 69 70 20 | 5c 27 73 0d 0a 0d 0a 09 |/ strip |\'s.....|
|00002860| 2f 2f 20 54 68 65 20 73 | 65 72 76 65 72 20 6e 61 |// The s|erver na|
|00002870| 6d 65 2c 20 69 2e 65 2e | 3a 20 42 6f 62 27 73 20 |me, i.e.|: Bob's |
|00002880| 53 65 72 76 65 72 0d 0a | 09 52 65 73 75 6c 74 53 |Server..|.ResultS|
|00002890| 65 74 20 3d 20 22 5c 5c | 68 6f 73 74 6e 61 6d 65 |et = "\\|hostname|
|000028a0| 5c 5c 22 24 53 65 72 76 | 65 72 4e 61 6d 65 3b 0d |\\"$Serv|erName;.|
|000028b0| 0a 0d 0a 09 2f 2f 20 54 | 68 65 20 73 68 6f 72 74 |....// T|he short|
|000028c0| 20 73 65 72 76 65 72 20 | 6e 61 6d 65 0d 0a 09 2f | server |name.../|
|000028d0| 2f 52 65 73 75 6c 74 53 | 65 74 20 3d 20 52 65 73 |/ResultS|et = Res|
|000028e0| 75 6c 74 53 65 74 24 22 | 5c 5c 73 68 6f 72 74 6e |ultSet$"|\\shortn|
|000028f0| 61 6d 65 5c 5c 22 24 4c | 65 76 65 6c 2e 47 61 6d |ame\\"$L|evel.Gam|
|00002900| 65 2e 47 61 6d 65 52 65 | 70 6c 69 63 61 74 69 6f |e.GameRe|plicatio|
|00002910| 6e 49 6e 66 6f 2e 53 68 | 6f 72 74 4e 61 6d 65 3b |nInfo.Sh|ortName;|
|00002920| 0d 0a 0d 0a 09 2f 2f 20 | 54 68 65 20 73 65 72 76 |.....// |The serv|
|00002930| 65 72 20 70 6f 72 74 2e | 0d 0a 09 52 65 73 75 6c |er port.|...Resul|
|00002940| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00002950| 24 22 5c 5c 68 6f 73 74 | 70 6f 72 74 5c 5c 22 24 |$"\\host|port\\"$|
|00002960| 4c 65 76 65 6c 2e 47 61 | 6d 65 2e 47 65 74 53 65 |Level.Ga|me.GetSe|
|00002970| 72 76 65 72 50 6f 72 74 | 28 29 3b 0d 0a 0d 0a 09 |rverPort|();.....|
|00002980| 2f 2f 20 28 6f 70 74 69 | 6f 6e 61 6c 29 20 54 68 |// (opti|onal) Th|
|00002990| 65 20 73 65 72 76 65 72 | 20 49 50 0d 0a 09 2f 2f |e server| IP...//|
|000029a0| 20 69 66 20 28 53 65 72 | 76 65 72 49 50 20 21 3d | if (Ser|verIP !=|
|000029b0| 20 22 22 29 0d 0a 09 2f | 2f 09 52 65 73 75 6c 74 | "").../|/.Result|
|000029c0| 53 65 74 20 3d 20 52 65 | 73 75 6c 74 53 65 74 24 |Set = Re|sultSet$|
|000029d0| 22 5c 5c 68 6f 73 74 69 | 70 5c 5c 22 24 53 65 72 |"\\hosti|p\\"$Ser|
|000029e0| 76 65 72 49 50 3b 0d 0a | 0d 0a 09 2f 2f 20 54 68 |verIP;..|...// Th|
|000029f0| 65 20 6d 61 70 2f 6c 65 | 76 65 6c 20 74 69 74 6c |e map/le|vel titl|
|00002a00| 65 0d 0a 09 52 65 73 75 | 6c 74 53 65 74 20 3d 20 |e...Resu|ltSet = |
|00002a10| 52 65 73 75 6c 74 53 65 | 74 24 22 5c 5c 6d 61 70 |ResultSe|t$"\\map|
|00002a20| 74 69 74 6c 65 5c 5c 22 | 24 4c 65 76 65 6c 2e 54 |title\\"|$Level.T|
|00002a30| 69 74 6c 65 3b 0d 0a 0d | 0a 09 2f 2f 20 4d 61 70 |itle;...|..// Map|
|00002a40| 20 6e 61 6d 65 0d 0a 09 | 52 65 73 75 6c 74 53 65 | name...|ResultSe|
|00002a50| 74 20 3d 20 52 65 73 75 | 6c 74 53 65 74 24 22 5c |t = Resu|ltSet$"\|
|00002a60| 5c 6d 61 70 6e 61 6d 65 | 5c 5c 22 24 4c 65 66 74 |\mapname|\\"$Left|
|00002a70| 28 73 74 72 69 6e 67 28 | 4c 65 76 65 6c 29 2c 20 |(string(|Level), |
|00002a80| 49 6e 53 74 72 28 73 74 | 72 69 6e 67 28 4c 65 76 |InStr(st|ring(Lev|
|00002a90| 65 6c 29 2c 20 22 2e 22 | 29 29 3b 0d 0a 0d 0a 09 |el), "."|));.....|
|00002aa0| 2f 2f 20 54 68 65 20 6d | 6f 64 20 6f 72 20 67 61 |// The m|od or ga|
|00002ab0| 6d 65 20 74 79 70 65 0d | 0a 09 52 65 73 75 6c 74 |me type.|..Result|
|00002ac0| 53 65 74 20 3d 20 52 65 | 73 75 6c 74 53 65 74 24 |Set = Re|sultSet$|
|00002ad0| 22 5c 5c 67 61 6d 65 74 | 79 70 65 5c 5c 22 24 47 |"\\gamet|ype\\"$G|
|00002ae0| 65 74 49 74 65 6d 4e 61 | 6d 65 28 73 74 72 69 6e |etItemNa|me(strin|
|00002af0| 67 28 4c 65 76 65 6c 2e | 47 61 6d 65 2e 43 6c 61 |g(Level.|Game.Cla|
|00002b00| 73 73 29 29 3b 0d 0a 0d | 0a 09 2f 2f 20 54 68 65 |ss));...|..// The|
|00002b10| 20 6e 75 6d 62 65 72 20 | 6f 66 20 70 6c 61 79 65 | number |of playe|
|00002b20| 72 73 0d 0a 09 52 65 73 | 75 6c 74 53 65 74 20 3d |rs...Res|ultSet =|
|00002b30| 20 52 65 73 75 6c 74 53 | 65 74 24 22 5c 5c 6e 75 | ResultS|et$"\\nu|
|00002b40| 6d 70 6c 61 79 65 72 73 | 5c 5c 22 24 4c 65 76 65 |mplayers|\\"$Leve|
|00002b50| 6c 2e 47 61 6d 65 2e 47 | 65 74 4e 75 6d 50 6c 61 |l.Game.G|etNumPla|
|00002b60| 79 65 72 73 28 29 3b 0d | 0a 0d 0a 09 2f 2f 20 54 |yers();.|....// T|
|00002b70| 68 65 20 6d 61 78 69 6d | 75 6d 20 6e 75 6d 62 65 |he maxim|um numbe|
|00002b80| 72 20 6f 66 20 70 6c 61 | 79 65 72 73 0d 0a 09 52 |r of pla|yers...R|
|00002b90| 65 73 75 6c 74 53 65 74 | 20 3d 20 52 65 73 75 6c |esultSet| = Resul|
|00002ba0| 74 53 65 74 24 22 5c 5c | 6d 61 78 70 6c 61 79 65 |tSet$"\\|maxplaye|
|00002bb0| 72 73 5c 5c 22 24 4c 65 | 76 65 6c 2e 47 61 6d 65 |rs\\"$Le|vel.Game|
|00002bc0| 2e 4d 61 78 50 6c 61 79 | 65 72 73 3b 0d 0a 0d 0a |.MaxPlay|ers;....|
|00002bd0| 09 2f 2f 20 54 68 65 20 | 67 61 6d 65 20 6d 6f 64 |.// The |game mod|
|00002be0| 65 3a 20 6f 70 65 6e 70 | 6c 61 79 69 6e 67 0d 0a |e: openp|laying..|
|00002bf0| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 52 65 73 |.ResultS|et = Res|
|00002c00| 75 6c 74 53 65 74 24 22 | 5c 5c 67 61 6d 65 6d 6f |ultSet$"|\\gamemo|
|00002c10| 64 65 5c 5c 6f 70 65 6e | 70 6c 61 79 69 6e 67 22 |de\\open|playing"|
|00002c20| 3b 0d 0a 0d 0a 09 2f 2f | 20 54 68 65 20 76 65 72 |;.....//| The ver|
|00002c30| 73 69 6f 6e 20 6f 66 20 | 74 68 69 73 20 67 61 6d |sion of |this gam|
|00002c40| 65 2e 0d 0a 09 52 65 73 | 75 6c 74 53 65 74 20 3d |e....Res|ultSet =|
|00002c50| 20 52 65 73 75 6c 74 53 | 65 74 24 22 5c 5c 67 61 | ResultS|et$"\\ga|
|00002c60| 6d 65 76 65 72 5c 5c 22 | 24 4c 65 76 65 6c 2e 45 |mever\\"|$Level.E|
|00002c70| 6e 67 69 6e 65 56 65 72 | 73 69 6f 6e 3b 0d 0a 0d |ngineVer|sion;...|
|00002c80| 0a 09 2f 2f 20 54 68 65 | 20 6d 6f 73 74 20 72 65 |..// The| most re|
|00002c90| 63 65 6e 74 20 6e 65 74 | 77 6f 72 6b 20 63 6f 6d |cent net|work com|
|00002ca0| 70 61 74 69 62 6c 65 20 | 76 65 72 73 69 6f 6e 2e |patible |version.|
|00002cb0| 0d 0a 09 69 66 28 20 4d | 69 6e 4e 65 74 56 65 72 |...if( M|inNetVer|
|00002cc0| 20 3e 3d 20 49 6e 74 28 | 4c 65 76 65 6c 2e 4d 69 | >= Int(|Level.Mi|
|00002cd0| 6e 4e 65 74 56 65 72 73 | 69 6f 6e 29 20 26 26 0d |nNetVers|ion) &&.|
|00002ce0| 0a 09 09 4d 69 6e 4e 65 | 74 56 65 72 20 3c 3d 20 |...MinNe|tVer <= |
|00002cf0| 49 6e 74 28 4c 65 76 65 | 6c 2e 45 6e 67 69 6e 65 |Int(Leve|l.Engine|
|00002d00| 56 65 72 73 69 6f 6e 29 | 20 29 0d 0a 09 09 52 65 |Version)| )....Re|
|00002d10| 73 75 6c 74 53 65 74 20 | 3d 20 52 65 73 75 6c 74 |sultSet |= Result|
|00002d20| 53 65 74 24 22 5c 5c 6d | 69 6e 6e 65 74 76 65 72 |Set$"\\m|innetver|
|00002d30| 5c 5c 22 24 73 74 72 69 | 6e 67 28 4d 69 6e 4e 65 |\\"$stri|ng(MinNe|
|00002d40| 74 56 65 72 29 3b 0d 0a | 09 65 6c 73 65 0d 0a 09 |tVer);..|.else...|
|00002d50| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 52 65 73 |.ResultS|et = Res|
|00002d60| 75 6c 74 53 65 74 24 22 | 5c 5c 6d 69 6e 6e 65 74 |ultSet$"|\\minnet|
|00002d70| 76 65 72 5c 5c 22 24 4c | 65 76 65 6c 2e 4d 69 6e |ver\\"$L|evel.Min|
|00002d80| 4e 65 74 56 65 72 73 69 | 6f 6e 3b 0d 0a 0d 0a 09 |NetVersi|on;.....|
|00002d90| 2f 2f 52 65 73 75 6c 74 | 53 65 74 20 3d 20 52 65 |//Result|Set = Re|
|00002da0| 73 75 6c 74 53 65 74 24 | 4c 65 76 65 6c 2e 47 61 |sultSet$|Level.Ga|
|00002db0| 6d 65 2e 47 65 74 49 6e | 66 6f 28 29 3b 0d 0a 0d |me.GetIn|fo();...|
|00002dc0| 0a 09 72 65 74 75 72 6e | 20 52 65 73 75 6c 74 53 |..return| ResultS|
|00002dd0| 65 74 3b 0d 0a 7d 0d 0a | 0d 0a 2f 2f 20 52 65 74 |et;..}..|..// Ret|
|00002de0| 75 72 6e 20 61 20 73 74 | 72 69 6e 67 20 6f 66 20 |urn a st|ring of |
|00002df0| 6d 69 73 63 65 6c 6c 61 | 6e 65 6f 75 73 20 69 6e |miscella|neous in|
|00002e00| 66 6f 72 6d 61 74 69 6f | 6e 2e 0d 0a 2f 2f 20 47 |formatio|n...// G|
|00002e10| 61 6d 65 20 73 70 65 63 | 69 66 69 63 20 69 6e 66 |ame spec|ific inf|
|00002e20| 6f 72 6d 61 74 69 6f 6e | 2c 20 75 73 65 72 20 64 |ormation|, user d|
|00002e30| 65 66 69 6e 65 64 20 64 | 61 74 61 2c 20 63 75 73 |efined d|ata, cus|
|00002e40| 74 6f 6d 20 70 61 72 61 | 6d 65 74 65 72 73 20 66 |tom para|meters f|
|00002e50| 6f 72 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 6c |or the c|ommand l|
|00002e60| 69 6e 65 2e 0d 0a 66 75 | 6e 63 74 69 6f 6e 20 73 |ine...fu|nction s|
|00002e70| 74 72 69 6e 67 20 47 65 | 74 52 75 6c 65 73 28 29 |tring Ge|tRules()|
|00002e80| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 73 74 72 69 |..{...lo|cal stri|
|00002e90| 6e 67 20 52 65 73 75 6c | 74 53 65 74 3b 0d 0a 0d |ng Resul|tSet;...|
|00002ea0| 0a 09 2f 2f 52 65 73 75 | 6c 74 53 65 74 20 3d 20 |..//Resu|ltSet = |
|00002eb0| 4c 65 76 65 6c 2e 47 61 | 6d 65 2e 47 65 74 52 75 |Level.Ga|me.GetRu|
|00002ec0| 6c 65 73 28 29 3b 0d 0a | 0d 0a 09 2f 2f 20 41 64 |les();..|...// Ad|
|00002ed0| 6d 69 6e 27 73 20 4e 61 | 6d 65 0d 0a 09 69 66 28 |min's Na|me...if(|
|00002ee0| 20 4c 65 76 65 6c 2e 47 | 61 6d 65 2e 47 61 6d 65 | Level.G|ame.Game|
|00002ef0| 52 65 70 6c 69 63 61 74 | 69 6f 6e 49 6e 66 6f 2e |Replicat|ionInfo.|
|00002f00| 41 64 6d 69 6e 4e 61 6d | 65 20 21 3d 20 22 22 20 |AdminNam|e != "" |
|00002f10| 29 0d 0a 09 09 52 65 73 | 75 6c 74 53 65 74 20 3d |)....Res|ultSet =|
|00002f20| 20 52 65 73 75 6c 74 53 | 65 74 24 22 5c 5c 41 64 | ResultS|et$"\\Ad|
|00002f30| 6d 69 6e 4e 61 6d 65 5c | 5c 22 24 4c 65 76 65 6c |minName\|\"$Level|
|00002f40| 2e 47 61 6d 65 2e 47 61 | 6d 65 52 65 70 6c 69 63 |.Game.Ga|meReplic|
|00002f50| 61 74 69 6f 6e 49 6e 66 | 6f 2e 41 64 6d 69 6e 4e |ationInf|o.AdminN|
|00002f60| 61 6d 65 3b 0d 0a 0d 0a | 09 2f 2f 20 41 64 6d 69 |ame;....|.// Admi|
|00002f70| 6e 27 73 20 45 6d 61 69 | 6c 0d 0a 09 69 66 28 20 |n's Emai|l...if( |
|00002f80| 4c 65 76 65 6c 2e 47 61 | 6d 65 2e 47 61 6d 65 52 |Level.Ga|me.GameR|
|00002f90| 65 70 6c 69 63 61 74 69 | 6f 6e 49 6e 66 6f 2e 41 |eplicati|onInfo.A|
|00002fa0| 64 6d 69 6e 45 6d 61 69 | 6c 20 21 3d 20 22 22 20 |dminEmai|l != "" |
|00002fb0| 29 0d 0a 09 09 52 65 73 | 75 6c 74 53 65 74 20 3d |)....Res|ultSet =|
|00002fc0| 20 52 65 73 75 6c 74 53 | 65 74 24 22 5c 5c 41 64 | ResultS|et$"\\Ad|
|00002fd0| 6d 69 6e 45 4d 61 69 6c | 5c 5c 22 24 4c 65 76 65 |minEMail|\\"$Leve|
|00002fe0| 6c 2e 47 61 6d 65 2e 47 | 61 6d 65 52 65 70 6c 69 |l.Game.G|ameRepli|
|00002ff0| 63 61 74 69 6f 6e 49 6e | 66 6f 2e 41 64 6d 69 6e |cationIn|fo.Admin|
|00003000| 45 6d 61 69 6c 3b 0d 0a | 0d 0a 09 2f 2f 20 57 68 |Email;..|...// Wh|
|00003010| 65 74 68 65 72 20 74 68 | 65 20 73 65 72 76 65 72 |ether th|e server|
|00003020| 20 69 73 20 70 61 73 73 | 77 6f 72 64 20 70 72 6f | is pass|word pro|
|00003030| 74 65 63 74 65 64 2e 0d | 0a 09 69 66 28 20 4c 65 |tected..|..if( Le|
|00003040| 76 65 6c 2e 47 61 6d 65 | 2e 41 63 63 65 73 73 43 |vel.Game|.AccessC|
|00003050| 6f 6e 74 72 6f 6c 20 21 | 3d 20 4e 6f 6e 65 20 26 |ontrol !|= None &|
|00003060| 26 20 4c 65 76 65 6c 2e | 47 61 6d 65 2e 41 63 63 |& Level.|Game.Acc|
|00003070| 65 73 73 43 6f 6e 74 72 | 6f 6c 2e 52 65 71 75 69 |essContr|ol.Requi|
|00003080| 72 65 73 50 61 73 73 77 | 6f 72 64 28 29 20 29 0d |resPassw|ord() ).|
|00003090| 0a 09 09 52 65 73 75 6c | 74 53 65 74 20 3d 20 52 |...Resul|tSet = R|
|000030a0| 65 73 75 6c 74 53 65 74 | 24 22 5c 5c 70 61 73 73 |esultSet|$"\\pass|
|000030b0| 77 6f 72 64 5c 5c 31 22 | 3b 0d 0a 09 65 6c 73 65 |word\\1"|;...else|
|000030c0| 0d 0a 09 09 52 65 73 75 | 6c 74 53 65 74 20 3d 20 |....Resu|ltSet = |
|000030d0| 52 65 73 75 6c 74 53 65 | 74 24 22 5c 5c 70 61 73 |ResultSe|t$"\\pas|
|000030e0| 73 77 6f 72 64 5c 5c 30 | 22 3b 0d 0a 0d 0a 09 72 |sword\\0|";.....r|
|000030f0| 65 74 75 72 6e 20 52 65 | 73 75 6c 74 53 65 74 3b |eturn Re|sultSet;|
|00003100| 0d 0a 7d 0d 0a 0d 0a 2f | 2f 20 52 65 74 75 72 6e |..}..../|/ Return|
|00003110| 20 61 20 73 74 72 69 6e | 67 20 6f 66 20 69 6e 66 | a strin|g of inf|
|00003120| 6f 72 6d 61 74 69 6f 6e | 20 6f 6e 20 61 20 70 6c |ormation| on a pl|
|00003130| 61 79 65 72 2e 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |ayer...f|unction |
|00003140| 73 74 72 69 6e 67 20 47 | 65 74 50 6c 61 79 65 72 |string G|etPlayer|
|00003150| 28 20 50 6c 61 79 65 72 | 43 6f 6e 74 72 6f 6c 6c |( Player|Controll|
|00003160| 65 72 20 50 2c 20 69 6e | 74 20 50 6c 61 79 65 72 |er P, in|t Player|
|00003170| 4e 75 6d 20 29 0d 0a 7b | 0d 0a 09 6c 6f 63 61 6c |Num )..{|...local|
|00003180| 20 73 74 72 69 6e 67 20 | 52 65 73 75 6c 74 53 65 | string |ResultSe|
|00003190| 74 3b 0d 0a 09 6c 6f 63 | 61 6c 20 73 74 72 69 6e |t;...loc|al strin|
|000031a0| 67 20 50 6c 61 79 65 72 | 4e 61 6d 65 3b 0d 0a 0d |g Player|Name;...|
|000031b0| 0a 09 50 6c 61 79 65 72 | 4e 61 6d 65 20 3d 20 50 |..Player|Name = P|
|000031c0| 2e 50 6c 61 79 65 72 52 | 65 70 6c 69 63 61 74 69 |.PlayerR|eplicati|
|000031d0| 6f 6e 49 6e 66 6f 2e 50 | 6c 61 79 65 72 4e 61 6d |onInfo.P|layerNam|
|000031e0| 65 3b 0d 0a 0d 0a 09 2f | 2f 20 4e 61 6d 65 0d 0a |e;...../|/ Name..|
|000031f0| 09 52 65 70 6c 61 63 65 | 54 65 78 74 28 50 6c 61 |.Replace|Text(Pla|
|00003200| 79 65 72 4e 61 6d 65 2c | 22 5c 5c 22 2c 22 22 29 |yerName,|"\\","")|
|00003210| 3b 09 2f 2f 20 73 74 72 | 69 70 20 5c 27 73 0d 0a |;.// str|ip \'s..|
|00003220| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 22 5c 5c |.ResultS|et = "\\|
|00003230| 70 6c 61 79 65 72 5f 22 | 24 50 6c 61 79 65 72 4e |player_"|$PlayerN|
|00003240| 75 6d 24 22 5c 5c 22 24 | 50 6c 61 79 65 72 4e 61 |um$"\\"$|PlayerNa|
|00003250| 6d 65 3b 0d 0a 0d 0a 09 | 2f 2f 20 46 72 61 67 73 |me;.....|// Frags|
|00003260| 0d 0a 09 52 65 73 75 6c | 74 53 65 74 20 3d 20 52 |...Resul|tSet = R|
|00003270| 65 73 75 6c 74 53 65 74 | 24 22 5c 5c 66 72 61 67 |esultSet|$"\\frag|
|00003280| 73 5f 22 24 50 6c 61 79 | 65 72 4e 75 6d 24 22 5c |s_"$Play|erNum$"\|
|00003290| 5c 22 24 69 6e 74 28 50 | 2e 50 6c 61 79 65 72 52 |\"$int(P|.PlayerR|
|000032a0| 65 70 6c 69 63 61 74 69 | 6f 6e 49 6e 66 6f 2e 53 |eplicati|onInfo.S|
|000032b0| 63 6f 72 65 29 3b 0d 0a | 0d 0a 09 2f 2f 20 50 69 |core);..|...// Pi|
|000032c0| 6e 67 0d 0a 09 52 65 73 | 75 6c 74 53 65 74 20 3d |ng...Res|ultSet =|
|000032d0| 20 52 65 73 75 6c 74 53 | 65 74 24 22 5c 5c 70 69 | ResultS|et$"\\pi|
|000032e0| 6e 67 5f 22 24 50 6c 61 | 79 65 72 4e 75 6d 24 22 |ng_"$Pla|yerNum$"|
|000032f0| 5c 5c 22 24 50 2e 43 6f | 6e 73 6f 6c 65 43 6f 6d |\\"$P.Co|nsoleCom|
|00003300| 6d 61 6e 64 28 22 47 45 | 54 50 49 4e 47 22 29 3b |mand("GE|TPING");|
|00003310| 0d 0a 0d 0a 09 2f 2f 20 | 54 65 61 6d 0d 0a 09 69 |.....// |Team...i|
|00003320| 66 28 50 2e 50 6c 61 79 | 65 72 52 65 70 6c 69 63 |f(P.Play|erReplic|
|00003330| 61 74 69 6f 6e 49 6e 66 | 6f 2e 54 65 61 6d 20 21 |ationInf|o.Team !|
|00003340| 3d 20 4e 6f 6e 65 29 0d | 0a 09 09 52 65 73 75 6c |= None).|...Resul|
|00003350| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00003360| 24 22 5c 5c 74 65 61 6d | 5f 22 24 50 6c 61 79 65 |$"\\team|_"$Playe|
|00003370| 72 4e 75 6d 24 22 5c 5c | 22 24 50 2e 50 6c 61 79 |rNum$"\\|"$P.Play|
|00003380| 65 72 52 65 70 6c 69 63 | 61 74 69 6f 6e 49 6e 66 |erReplic|ationInf|
|00003390| 6f 2e 54 65 61 6d 2e 54 | 65 61 6d 49 6e 64 65 78 |o.Team.T|eamIndex|
|000033a0| 3b 0d 0a 09 65 6c 73 65 | 0d 0a 09 09 52 65 73 75 |;...else|....Resu|
|000033b0| 6c 74 53 65 74 20 3d 20 | 52 65 73 75 6c 74 53 65 |ltSet = |ResultSe|
|000033c0| 74 24 22 5c 5c 74 65 61 | 6d 5f 22 24 50 6c 61 79 |t$"\\tea|m_"$Play|
|000033d0| 65 72 4e 75 6d 24 22 5c | 5c 30 22 3b 0d 0a 0d 0a |erNum$"\|\0";....|
|000033e0| 09 72 65 74 75 72 6e 20 | 52 65 73 75 6c 74 53 65 |.return |ResultSe|
|000033f0| 74 3b 0d 0a 7d 0d 0a 0d | 0a 2f 2f 20 53 65 6e 64 |t;..}...|.// Send|
|00003400| 20 64 61 74 61 20 66 6f | 72 20 65 61 63 68 20 70 | data fo|r each p|
|00003410| 6c 61 79 65 72 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |layer..f|unction |
|00003420| 62 6f 6f 6c 20 53 65 6e | 64 50 6c 61 79 65 72 73 |bool Sen|dPlayers|
|00003430| 28 49 70 41 64 64 72 20 | 41 64 64 72 2c 20 69 6e |(IpAddr |Addr, in|
|00003440| 74 20 51 75 65 72 79 4e | 75 6d 2c 20 6f 75 74 20 |t QueryN|um, out |
|00003450| 69 6e 74 20 50 61 63 6b | 65 74 4e 75 6d 2c 20 69 |int Pack|etNum, i|
|00003460| 6e 74 20 62 46 69 6e 61 | 6c 50 61 63 6b 65 74 29 |nt bFina|lPacket)|
|00003470| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 43 6f 6e 74 |..{...lo|cal Cont|
|00003480| 72 6f 6c 6c 65 72 20 43 | 3b 0d 0a 09 6c 6f 63 61 |roller C|;...loca|
|00003490| 6c 20 69 6e 74 20 69 3b | 0d 0a 09 6c 6f 63 61 6c |l int i;|...local|
|000034a0| 20 62 6f 6f 6c 20 52 65 | 73 75 6c 74 2c 20 53 65 | bool Re|sult, Se|
|000034b0| 6e 64 52 65 73 75 6c 74 | 3b 0d 0a 0d 0a 09 52 65 |ndResult|;.....Re|
|000034c0| 73 75 6c 74 20 3d 20 66 | 61 6c 73 65 3b 0d 0a 0d |sult = f|alse;...|
|000034d0| 0a 09 43 20 3d 20 4c 65 | 76 65 6c 2e 43 6f 6e 74 |..C = Le|vel.Cont|
|000034e0| 72 6f 6c 6c 65 72 4c 69 | 73 74 3b 0d 0a 09 77 68 |rollerLi|st;...wh|
|000034f0| 69 6c 65 28 20 69 20 3c | 20 4c 65 76 65 6c 2e 47 |ile( i <| Level.G|
|00003500| 61 6d 65 2e 4e 75 6d 50 | 6c 61 79 65 72 73 20 29 |ame.NumP|layers )|
|00003510| 0d 0a 09 7b 0d 0a 09 09 | 69 66 20 28 43 20 3d 3d |...{....|if (C ==|
|00003520| 20 4e 6f 6e 65 29 0d 0a | 09 09 7b 0d 0a 09 09 09 | None)..|..{.....|
|00003530| 69 66 28 62 46 69 6e 61 | 6c 50 61 63 6b 65 74 3d |if(bFina|lPacket=|
|00003540| 3d 31 29 0d 0a 09 09 09 | 09 53 65 6e 64 52 65 73 |=1).....|.SendRes|
|00003550| 75 6c 74 20 3d 20 53 65 | 6e 64 41 50 61 63 6b 65 |ult = Se|ndAPacke|
|00003560| 74 28 41 64 64 72 2c 51 | 75 65 72 79 4e 75 6d 2c |t(Addr,Q|ueryNum,|
|00003570| 50 61 63 6b 65 74 4e 75 | 6d 2c 62 46 69 6e 61 6c |PacketNu|m,bFinal|
|00003580| 50 61 63 6b 65 74 29 3b | 0d 0a 09 09 09 52 65 73 |Packet);|.....Res|
|00003590| 75 6c 74 20 3d 20 53 65 | 6e 64 52 65 73 75 6c 74 |ult = Se|ndResult|
|000035a0| 20 7c 7c 20 52 65 73 75 | 6c 74 3b 0d 0a 09 09 09 | || Resu|lt;.....|
|000035b0| 62 72 65 61 6b 3b 0d 0a | 09 09 7d 0d 0a 09 09 65 |break;..|..}....e|
|000035c0| 6c 73 65 20 69 66 20 28 | 43 2e 49 73 41 28 27 50 |lse if (|C.IsA('P|
|000035d0| 6c 61 79 65 72 43 6f 6e | 74 72 6f 6c 6c 65 72 27 |layerCon|troller'|
|000035e0| 29 20 26 26 20 43 2e 50 | 6c 61 79 65 72 52 65 70 |) && C.P|layerRep|
|000035f0| 6c 69 63 61 74 69 6f 6e | 49 6e 66 6f 20 21 3d 20 |lication|Info != |
|00003600| 4e 6f 6e 65 20 26 26 20 | 21 43 2e 50 6c 61 79 65 |None && |!C.Playe|
|00003610| 72 52 65 70 6c 69 63 61 | 74 69 6f 6e 49 6e 66 6f |rReplica|tionInfo|
|00003620| 2e 62 4f 6e 6c 79 53 70 | 65 63 74 61 74 6f 72 29 |.bOnlySp|ectator)|
|00003630| 0d 0a 09 09 7b 0d 0a 09 | 09 09 69 66 28 20 69 3d |....{...|..if( i=|
|00003640| 3d 4c 65 76 65 6c 2e 47 | 61 6d 65 2e 4e 75 6d 50 |=Level.G|ame.NumP|
|00003650| 6c 61 79 65 72 73 2d 31 | 20 26 26 20 62 46 69 6e |layers-1| && bFin|
|00003660| 61 6c 50 61 63 6b 65 74 | 3d 3d 31 29 0d 0a 09 09 |alPacket|==1)....|
|00003670| 09 09 53 65 6e 64 52 65 | 73 75 6c 74 20 3d 20 53 |..SendRe|sult = S|
|00003680| 65 6e 64 51 75 65 72 79 | 50 61 63 6b 65 74 28 41 |endQuery|Packet(A|
|00003690| 64 64 72 2c 20 47 65 74 | 50 6c 61 79 65 72 28 50 |ddr, Get|Player(P|
|000036a0| 6c 61 79 65 72 43 6f 6e | 74 72 6f 6c 6c 65 72 28 |layerCon|troller(|
|000036b0| 43 29 2c 20 69 29 2c 20 | 51 75 65 72 79 4e 75 6d |C), i), |QueryNum|
|000036c0| 2c 20 50 61 63 6b 65 74 | 4e 75 6d 2c 20 31 29 3b |, Packet|Num, 1);|
|000036d0| 0d 0a 09 09 09 65 6c 73 | 65 0d 0a 09 09 09 09 53 |.....els|e......S|
|000036e0| 65 6e 64 52 65 73 75 6c | 74 20 3d 20 53 65 6e 64 |endResul|t = Send|
|000036f0| 51 75 65 72 79 50 61 63 | 6b 65 74 28 41 64 64 72 |QueryPac|ket(Addr|
|00003700| 2c 20 47 65 74 50 6c 61 | 79 65 72 28 50 6c 61 79 |, GetPla|yer(Play|
|00003710| 65 72 43 6f 6e 74 72 6f | 6c 6c 65 72 28 43 29 2c |erContro|ller(C),|
|00003720| 20 69 29 2c 20 51 75 65 | 72 79 4e 75 6d 2c 20 50 | i), Que|ryNum, P|
|00003730| 61 63 6b 65 74 4e 75 6d | 2c 20 30 29 3b 0d 0a 09 |acketNum|, 0);...|
|00003740| 09 09 52 65 73 75 6c 74 | 20 3d 20 53 65 6e 64 52 |..Result| = SendR|
|00003750| 65 73 75 6c 74 20 7c 7c | 20 52 65 73 75 6c 74 3b |esult ||| Result;|
|00003760| 0d 0a 09 09 09 69 2b 2b | 3b 0d 0a 09 09 7d 0d 0a |.....i++|;....}..|
|00003770| 09 09 43 20 3d 20 43 2e | 4e 65 78 74 43 6f 6e 74 |..C = C.|NextCont|
|00003780| 72 6f 6c 6c 65 72 3b 0d | 0a 09 7d 0d 0a 0d 0a 09 |roller;.|..}.....|
|00003790| 72 65 74 75 72 6e 20 52 | 65 73 75 6c 74 3b 0d 0a |return R|esult;..|
|000037a0| 7d 0d 0a 0d 0a 2f 2f 20 | 47 65 74 20 61 6e 20 61 |}....// |Get an a|
|000037b0| 72 62 69 74 72 61 72 79 | 20 70 72 6f 70 65 72 74 |rbitrary| propert|
|000037c0| 79 20 66 72 6f 6d 20 74 | 68 65 20 6c 65 76 65 6c |y from t|he level|
|000037d0| 20 6f 62 6a 65 63 74 2e | 0d 0a 66 75 6e 63 74 69 | object.|..functi|
|000037e0| 6f 6e 20 73 74 72 69 6e | 67 20 47 65 74 4c 65 76 |on strin|g GetLev|
|000037f0| 65 6c 50 72 6f 70 65 72 | 74 79 28 20 73 74 72 69 |elProper|ty( stri|
|00003800| 6e 67 20 50 72 6f 70 20 | 29 0d 0a 7b 0d 0a 09 6c |ng Prop |)..{...l|
|00003810| 6f 63 61 6c 20 73 74 72 | 69 6e 67 20 52 65 73 75 |ocal str|ing Resu|
|00003820| 6c 74 53 65 74 3b 0d 0a | 0d 0a 09 52 65 73 75 6c |ltSet;..|...Resul|
|00003830| 74 53 65 74 20 3d 20 22 | 5c 5c 22 24 50 72 6f 70 |tSet = "|\\"$Prop|
|00003840| 24 22 5c 5c 22 24 4c 65 | 76 65 6c 2e 47 65 74 50 |$"\\"$Le|vel.GetP|
|00003850| 72 6f 70 65 72 74 79 54 | 65 78 74 28 50 72 6f 70 |ropertyT|ext(Prop|
|00003860| 29 3b 0d 0a 0d 0a 09 72 | 65 74 75 72 6e 20 52 65 |);.....r|eturn Re|
|00003870| 73 75 6c 74 53 65 74 3b | 0d 0a 7d 0d 0a 0d 0a 2f |sultSet;|..}..../|
|00003880| 2f 20 47 65 74 20 61 6e | 20 61 72 62 69 74 72 61 |/ Get an| arbitra|
|00003890| 72 79 20 70 72 6f 70 65 | 72 74 79 20 66 72 6f 6d |ry prope|rty from|
|000038a0| 20 74 68 65 20 67 61 6d | 65 20 6f 62 6a 65 63 74 | the gam|e object|
|000038b0| 2e 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 73 74 72 69 |...funct|ion stri|
|000038c0| 6e 67 20 47 65 74 47 61 | 6d 65 50 72 6f 70 65 72 |ng GetGa|meProper|
|000038d0| 74 79 28 20 73 74 72 69 | 6e 67 20 50 72 6f 70 20 |ty( stri|ng Prop |
|000038e0| 29 0d 0a 7b 0d 0a 09 6c | 6f 63 61 6c 20 73 74 72 |)..{...l|ocal str|
|000038f0| 69 6e 67 20 52 65 73 75 | 6c 74 53 65 74 3b 0d 0a |ing Resu|ltSet;..|
|00003900| 0d 0a 09 52 65 73 75 6c | 74 53 65 74 20 3d 20 22 |...Resul|tSet = "|
|00003910| 5c 5c 22 24 50 72 6f 70 | 24 22 5c 5c 22 24 4c 65 |\\"$Prop|$"\\"$Le|
|00003920| 76 65 6c 2e 47 61 6d 65 | 2e 47 65 74 50 72 6f 70 |vel.Game|.GetProp|
|00003930| 65 72 74 79 54 65 78 74 | 28 50 72 6f 70 29 3b 0d |ertyText|(Prop);.|
|00003940| 0a 0d 0a 09 72 65 74 75 | 72 6e 20 52 65 73 75 6c |....retu|rn Resul|
|00003950| 74 53 65 74 3b 0d 0a 7d | 0d 0a 0d 0a 2f 2f 20 47 |tSet;..}|....// G|
|00003960| 65 74 20 61 6e 20 61 72 | 62 69 74 72 61 72 79 20 |et an ar|bitrary |
|00003970| 70 72 6f 70 65 72 74 79 | 20 66 72 6f 6d 20 74 68 |property| from th|
|00003980| 65 20 70 6c 61 79 65 72 | 73 2e 0d 0a 66 75 6e 63 |e player|s...func|
|00003990| 74 69 6f 6e 20 73 74 72 | 69 6e 67 20 47 65 74 50 |tion str|ing GetP|
|000039a0| 6c 61 79 65 72 50 72 6f | 70 65 72 74 79 28 20 73 |layerPro|perty( s|
|000039b0| 74 72 69 6e 67 20 50 72 | 6f 70 20 29 0d 0a 7b 0d |tring Pr|op )..{.|
|000039c0| 0a 09 6c 6f 63 61 6c 20 | 73 74 72 69 6e 67 20 52 |..local |string R|
|000039d0| 65 73 75 6c 74 53 65 74 | 3b 0d 0a 09 6c 6f 63 61 |esultSet|;...loca|
|000039e0| 6c 20 69 6e 74 20 69 3b | 0d 0a 09 6c 6f 63 61 6c |l int i;|...local|
|000039f0| 20 43 6f 6e 74 72 6f 6c | 6c 65 72 20 43 3b 0d 0a | Control|ler C;..|
|00003a00| 0d 0a 09 66 6f 72 65 61 | 63 68 20 41 6c 6c 41 63 |...forea|ch AllAc|
|00003a10| 74 6f 72 73 28 63 6c 61 | 73 73 27 43 6f 6e 74 72 |tors(cla|ss'Contr|
|00003a20| 6f 6c 6c 65 72 27 2c 20 | 43 29 0d 0a 09 7b 0d 0a |oller', |C)...{..|
|00003a30| 09 09 69 66 28 20 43 2e | 50 6c 61 79 65 72 52 65 |..if( C.|PlayerRe|
|00003a40| 70 6c 69 63 61 74 69 6f | 6e 49 6e 66 6f 21 3d 4e |plicatio|nInfo!=N|
|00003a50| 6f 6e 65 20 26 26 20 21 | 43 2e 50 6c 61 79 65 72 |one && !|C.Player|
|00003a60| 52 65 70 6c 69 63 61 74 | 69 6f 6e 49 6e 66 6f 2e |Replicat|ionInfo.|
|00003a70| 62 42 6f 74 20 29 0d 0a | 09 09 7b 0d 0a 09 09 09 |bBot )..|..{.....|
|00003a80| 69 2b 2b 3b 0d 0a 09 09 | 09 52 65 73 75 6c 74 53 |i++;....|.ResultS|
|00003a90| 65 74 20 3d 20 52 65 73 | 75 6c 74 53 65 74 24 0d |et = Res|ultSet$.|
|00003aa0| 0a 09 09 09 09 22 5c 5c | 22 24 0d 0a 09 09 09 09 |....."\\|"$......|
|00003ab0| 50 72 6f 70 24 0d 0a 09 | 09 09 09 22 5f 22 24 0d |Prop$...|..."_"$.|
|00003ac0| 0a 09 09 09 09 69 24 0d | 0a 09 09 09 09 22 5c 5c |.....i$.|....."\\|
|00003ad0| 22 24 0d 0a 09 09 09 09 | 43 2e 47 65 74 50 72 6f |"$......|C.GetPro|
|00003ae0| 70 65 72 74 79 54 65 78 | 74 28 50 72 6f 70 29 3b |pertyTex|t(Prop);|
|00003af0| 0d 0a 09 09 7d 0d 0a 09 | 7d 0d 0a 0d 0a 0d 0a 09 |....}...|}.......|
|00003b00| 72 65 74 75 72 6e 20 52 | 65 73 75 6c 74 53 65 74 |return R|esultSet|
|00003b10| 3b 0d 0a 7d 0d 0a 0d 0a | 00 |;..}....|. |
+--------+-------------------------+-------------------------+--------+--------+