PDA

View Full Version : Nr of server-packages...


rian
18th December, 2001, 10:40 AM
Hi there,
I decided to try n recompile CSHP for my server as i know many of You guys have done. I managed all that without too much hazzle. But the thing is, i haven't been using CSHP for a while since it did crash my server the second someone connects if i don't remove some of the server-packages. I found this function in HackProtection.uc:


function bool xxValidSP(string zzPackname)

{

 local int zzp;



 if (zzMyPacks == "")

  zzMyPacks = Caps(ConsoleCommand("get engine.gameengine serverpackages"));



 zzp = instr(zzMyPacks, Chr(34)$zzPackname$Chr(34));

 if (zzp == -1 || zzPackname ~= "BOTPACK")

  return false;

 

 return true;

}


Changed it to this:


function bool xxValidSP(string zzPackname)

{

       local string zzUsedPack;

       zzUsedPack = Caps(zzPackname);

if (zzUsedPack == "BOTPACK")

 return false;

       

       return true;

}



Now it doesn't crash the server anymore :) But it doesn't check the players skin against server-packages any more either, just that the skin doesn't use textures from "Botpack.u"
Think the problem is that the return from the "get engine.gameengine serverpackages" command adds up to approx 1100 chars in my case including the quotes, commas and parenthesis's. I've read that string variables are dynamically allocated in size but to which extent? Even when exceeding 1024 chars? Any idea how to modify that code-snippet to be able to check against the server's packages also?

I apologise in advance if i'm way off here or if it sounds too trivial but this is my first time ever venturing into UC-scripting:)

rian
19th December, 2001, 11:31 PM
Tried UTpureRC4 yesterday and it showed similar behaviour regarding the number of ServerPackages. Although it did crash the server directly instead of when someone connects to it. Had to remove some SP's to get the server to start properly. When up and running i (or anybody else for that matter) wasn't able to fire any weapon at all. But thats probably due to incompability with one/some of the mutators running on server. On the other hand that's kinda the ultimate cheat-protection, no one is allowed to fire any weapon at all :) So for now i'm back to my modified version of CSHP... Any one with more skills than i have in Unreal-scripting has a clue as to how to modify the original function in the previous post to work with many server-packages? Can i handle/convert the output from "get engine.gameengine serverpackages" as/to an array of strings or something? Convert chars to int's and store it in an array of int's maybe?
Greetings
Rian