2020-04-11 19:05:18 -04:00
|
|
|
var rconParser;
|
|
|
|
var eventParser;
|
|
|
|
|
|
|
|
var plugin = {
|
|
|
|
author: 'RaidMax',
|
2021-11-14 22:38:00 -05:00
|
|
|
version: 1.0,
|
2020-04-11 19:05:18 -04:00
|
|
|
name: 'Plutonium IW5 Parser',
|
|
|
|
isParser: true,
|
|
|
|
|
|
|
|
onEventAsync: function (gameEvent, server) {
|
|
|
|
},
|
|
|
|
|
|
|
|
onLoadAsync: function (manager) {
|
|
|
|
rconParser = manager.GenerateDynamicRConParser(this.name);
|
|
|
|
eventParser = manager.GenerateDynamicEventParser(this.name);
|
|
|
|
|
2020-04-17 16:05:16 -04:00
|
|
|
rconParser.Configuration.CommandPrefixes.Tell = 'tell {0} {1}';
|
2020-04-11 19:05:18 -04:00
|
|
|
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.RConGetDvar = '\xff\xff\xff\xffrcon {0} get {1}';
|
2021-06-06 14:40:58 -04:00
|
|
|
rconParser.Configuration.CommandPrefixes.RConResponse = '\xff\xff\xff\xffprint\n';
|
2020-04-11 19:05:18 -04:00
|
|
|
|
2020-04-13 20:43:24 -04:00
|
|
|
rconParser.Configuration.Dvar.Pattern = '^(.+) is "(.+)?"';
|
|
|
|
rconParser.Configuration.Dvar.AddMapping(106, 1);
|
|
|
|
rconParser.Configuration.Dvar.AddMapping(107, 2);
|
2020-04-17 16:05:16 -04:00
|
|
|
rconParser.Configuration.WaitForResponse = true;
|
2020-04-13 17:16:31 -04:00
|
|
|
rconParser.Configuration.CanGenerateLogPath = true;
|
2021-01-08 20:21:23 -05:00
|
|
|
rconParser.Configuration.NoticeLineSeparator = '. ';
|
2021-11-14 22:38:00 -05:00
|
|
|
rconParser.Configuration.DefaultRConPort = 27016;
|
|
|
|
|
|
|
|
rconParser.Configuration.DefaultInstallationDirectoryHint = '{LocalAppData}/Plutonium/storage/iw5';
|
2021-06-06 14:40:58 -04:00
|
|
|
|
|
|
|
rconParser.Configuration.StatusHeader.Pattern = 'num +score +bot +ping +guid +name +address +qport *';
|
|
|
|
rconParser.Configuration.Status.Pattern = '^ *([0-9]+) +-?([0-9]+) +(0|1) +((?:[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]+) *$';
|
|
|
|
rconParser.Configuration.Status.AddMapping(102, 4);
|
|
|
|
rconParser.Configuration.Status.AddMapping(103, 5);
|
|
|
|
rconParser.Configuration.Status.AddMapping(104, 6);
|
2021-08-28 18:56:41 -04:00
|
|
|
// basegame should not contain an absolute directory, but alas...
|
|
|
|
rconParser.Configuration.OverrideDvarNameMapping.Add('fs_homepath', 'fs_basegame');
|
2020-04-11 19:05:18 -04:00
|
|
|
|
2021-06-07 17:58:36 -04:00
|
|
|
rconParser.IsOneLog = true;
|
2020-04-11 19:05:18 -04:00
|
|
|
rconParser.Version = 'IW5 MP 1.9 build 388110 Fri Sep 14 00:04:28 2012 win-x86';
|
2020-04-13 17:16:31 -04:00
|
|
|
rconParser.GameName = 3; // IW5
|
2020-04-11 19:05:18 -04:00
|
|
|
eventParser.Version = 'IW5 MP 1.9 build 388110 Fri Sep 14 00:04:28 2012 win-x86';
|
2020-04-13 17:16:31 -04:00
|
|
|
eventParser.GameName = 3; // IW5
|
|
|
|
|
|
|
|
eventParser.Configuration.GameDirectory = '';
|
2020-05-19 12:01:08 -04:00
|
|
|
eventParser.URLProtocolFormat = 'plutonium://play/iw5mp/{{ip}}:{{port}}';
|
2020-04-11 19:05:18 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
onUnloadAsync: function () {
|
|
|
|
},
|
|
|
|
|
|
|
|
onTickAsync: function (server) {
|
|
|
|
}
|
|
|
|
};
|