2019-02-05 12:14:43 -05:00
|
|
|
var rconParser;
|
|
|
|
var eventParser;
|
|
|
|
|
|
|
|
var plugin = {
|
|
|
|
author: 'FrenchFry, RaidMax',
|
2022-08-27 22:25:42 -04:00
|
|
|
version: 0.9,
|
2019-02-05 12:14:43 -05:00
|
|
|
name: 'CoD4x Parser',
|
|
|
|
isParser: true,
|
|
|
|
|
|
|
|
onEventAsync: function (gameEvent, server) {
|
|
|
|
},
|
|
|
|
|
|
|
|
onLoadAsync: function (manager) {
|
2020-01-21 19:08:18 -05:00
|
|
|
rconParser = manager.GenerateDynamicRConParser(this.name);
|
|
|
|
eventParser = manager.GenerateDynamicEventParser(this.name);
|
2019-02-05 12:14:43 -05:00
|
|
|
|
2020-04-17 16:05:16 -04:00
|
|
|
rconParser.Configuration.StatusHeader.Pattern = 'num +score +ping +playerid +steamid +name +lastmsg +address +qport +rate *';
|
2022-08-27 22:25:42 -04:00
|
|
|
rconParser.Configuration.Status.Pattern = '^ *([0-9]+) +-?([0-9]+) +((?:[A-Z]+|[0-9]+)) +((?:[a-z]|[0-9]{16,32})|0) +([[0-9]+|0]) +(.{0,34}) +([0-9]+) +(\\d+\\.\\d+\\.\\d+.\\d+\\:-*\\d{1,5}|0+.0+:-*\\d{1,5}|loopback|bot) +(-*[0-9]+) +([0-9]+) *$';
|
2019-02-06 21:12:35 -05:00
|
|
|
rconParser.Configuration.Status.AddMapping(104, 6); // RConName
|
|
|
|
rconParser.Configuration.Status.AddMapping(105, 8); // RConIPAddress
|
2020-12-02 15:29:49 -05:00
|
|
|
rconParser.Configuration.CommandPrefixes.RConResponse = '\xff\xff\xff\xffprint\n';
|
2019-02-06 21:12:35 -05:00
|
|
|
|
2019-02-05 12:14:43 -05:00
|
|
|
rconParser.Configuration.Dvar.Pattern = '^"(.+)" is: "(.+)?" default: "(.+)?" info: "(.+)?"$';
|
2019-02-06 21:12:35 -05:00
|
|
|
rconParser.Configuration.Dvar.AddMapping(109, 2); // DVAR latched value
|
|
|
|
rconParser.Configuration.Dvar.AddMapping(110, 4); // dvar info
|
2020-12-13 21:33:37 -05:00
|
|
|
rconParser.Configuration.GuidNumberStyle = 7; // Integer
|
|
|
|
rconParser.Configuration.NoticeLineSeparator = '. '; // CoD4x does not support \n in the client notice
|
2021-11-14 22:38:00 -05:00
|
|
|
rconParser.Configuration.DefaultRConPort = 28960;
|
2020-12-16 14:11:30 -05:00
|
|
|
rconParser.Version = 'CoD4 X - win_mingw-x86 build 1056 Dec 12 2020';
|
2019-02-05 19:02:45 -05:00
|
|
|
rconParser.GameName = 1; // IW3
|
2019-02-05 12:14:43 -05:00
|
|
|
|
|
|
|
eventParser.Configuration.GameDirectory = 'main';
|
2020-12-13 21:33:37 -05:00
|
|
|
eventParser.Configuration.GuidNumberStyle = 7; // Integer
|
2020-12-16 14:11:30 -05:00
|
|
|
eventParser.Version = 'CoD4 X - win_mingw-x86 build 1056 Dec 12 2020';
|
2019-02-05 19:02:45 -05:00
|
|
|
eventParser.GameName = 1; // IW3
|
2019-04-06 22:48:49 -04:00
|
|
|
eventParser.URLProtocolFormat = 'cod4://{{ip}}:{{port}}';
|
2019-02-05 12:14:43 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
onUnloadAsync: function () {
|
|
|
|
},
|
|
|
|
|
|
|
|
onTickAsync: function (server) {
|
|
|
|
}
|
2022-08-27 22:25:42 -04:00
|
|
|
};
|