Added additional properties method to allow easier extension to client properties
updated VPN plugin to use WebClient message is sent to client trying to execute commands before they are authenticated fixed rare issue with ToAdmins failing record bullet distance fraction for client kills (_customcallbacks) change client level/permissions through webfront ability to tempban through webfront
This commit is contained in:
@ -24,20 +24,20 @@ const plugin = {
|
||||
let usingVPN = false;
|
||||
|
||||
try {
|
||||
let httpRequest = System.Net.WebRequest.Create('https://api.xdefcon.com/proxy/check/?ip=' + origin.IPAddressString);
|
||||
let response = httpRequest.GetResponse();
|
||||
let data = response.GetResponseStream();
|
||||
let streamReader = new System.IO.StreamReader(data);
|
||||
let jsonResponse = streamReader.ReadToEnd();
|
||||
streamReader.Dispose();
|
||||
response.Close();
|
||||
let parsedJSON = JSON.parse(jsonResponse);
|
||||
let cl = new System.Net.Http.HttpClient();
|
||||
let re = cl.GetAsync('https://api.xdefcon.com/proxy/check/?ip=' + origin.IPAddressString).Result;
|
||||
let co = re.Content;
|
||||
let parsedJSON = JSON.parse(co.ReadAsStringAsync().Result);
|
||||
//co.Dispose();
|
||||
//re.Dispose();
|
||||
//cl.Dispose();
|
||||
usingVPN = parsedJSON['success'] && parsedJSON['proxy'];
|
||||
} catch (e) {
|
||||
this.logger.WriteError(e.message);
|
||||
}
|
||||
|
||||
if (usingVPN) {
|
||||
this.logger.WriteInfo(origin + ' is using a VPN (' + origin.IPAddressString + ')');
|
||||
let library = importNamespace('SharedLibraryCore');
|
||||
let kickOrigin = new library.Objects.Player();
|
||||
kickOrigin.ClientId = 1;
|
||||
|
Reference in New Issue
Block a user