2020-11-07 11:40:58 -05:00
|
|
|
var rconParser;
|
|
|
|
var eventParser;
|
|
|
|
|
|
|
|
var plugin = {
|
2021-09-05 11:45:28 -04:00
|
|
|
author: 'Xerxes, RaidMax, st0rm',
|
2023-01-05 22:43:57 -05:00
|
|
|
version: 0.5,
|
2020-11-07 11:40:58 -05:00
|
|
|
name: 'IW6x Parser',
|
|
|
|
isParser: true,
|
|
|
|
|
|
|
|
onEventAsync: function (gameEvent, server) {
|
|
|
|
},
|
|
|
|
|
|
|
|
onLoadAsync: function (manager) {
|
|
|
|
rconParser = manager.GenerateDynamicRConParser(this.name);
|
|
|
|
eventParser = manager.GenerateDynamicEventParser(this.name);
|
|
|
|
|
|
|
|
rconParser.Configuration.CommandPrefixes.Tell = 'tell {0} {1}';
|
|
|
|
rconParser.Configuration.CommandPrefixes.Say = 'say {0}';
|
|
|
|
rconParser.Configuration.CommandPrefixes.Kick = 'clientkick {0} "{1}"';
|
|
|
|
rconParser.Configuration.CommandPrefixes.Ban = 'clientkick {0} "{1}"';
|
|
|
|
rconParser.Configuration.CommandPrefixes.TempBan = 'clientkick {0} "{1}"';
|
|
|
|
rconParser.Configuration.CommandPrefixes.RConResponse = '\xff\xff\xff\xffprint\n';
|
2023-01-05 22:43:57 -05:00
|
|
|
rconParser.Configuration.Dvar.Pattern = '^ *\\"(.+)\\" is: \\"(.+)?\\" default: \\"(.+)?\\"\\n?(?:latched: \\"(.+)?\\"\\n?)?(.*)$';
|
2020-11-11 18:31:26 -05:00
|
|
|
rconParser.Configuration.Status.Pattern = '^ *([0-9]+) +-?([0-9]+) +(Yes|No) +((?:[A-Z]+|[0-9]+)) +((?:[a-z]|[0-9]){8,32}|(?:[a-z]|[0-9]){8,32}|bot[0-9]+|(?:[0-9]+)) *(.{0,32}) +(\\d+\\.\\d+\\.\\d+.\\d+\\:-*\\d{1,5}|0+.0+:-*\\d{1,5}|loopback|unknown|bot) +(-*[0-9]+) *$';
|
2020-11-07 11:40:58 -05:00
|
|
|
rconParser.Configuration.StatusHeader.Pattern = 'num +score +bot +ping +guid +name +address +qport *';
|
|
|
|
rconParser.Configuration.WaitForResponse = false;
|
2021-11-14 22:38:00 -05:00
|
|
|
rconParser.Configuration.DefaultRConPort = 28960;
|
2023-01-06 11:49:10 -05:00
|
|
|
|
2020-11-07 11:40:58 -05:00
|
|
|
rconParser.Configuration.Status.AddMapping(102, 4);
|
|
|
|
rconParser.Configuration.Status.AddMapping(103, 5);
|
|
|
|
rconParser.Configuration.Status.AddMapping(104, 6);
|
|
|
|
|
|
|
|
rconParser.Version = 'IW6 MP 3.15 build 2 Sat Sep 14 2013 03:58:30PM win64';
|
|
|
|
rconParser.GameName = 4; // IW6
|
|
|
|
eventParser.Version = 'IW6 MP 3.15 build 2 Sat Sep 14 2013 03:58:30PM win64';
|
|
|
|
eventParser.GameName = 4; // IW6
|
2023-01-06 11:49:10 -05:00
|
|
|
|
2021-09-05 11:45:28 -04:00
|
|
|
eventParser.Configuration.GameDirectory = '';
|
2023-01-06 11:49:10 -05:00
|
|
|
eventParser.Configuration.LocalizeText = '\x1f';
|
2020-11-07 11:40:58 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
onUnloadAsync: function () {
|
|
|
|
},
|
|
|
|
|
|
|
|
onTickAsync: function (server) {
|
|
|
|
}
|
|
|
|
};
|