WMesaageHack auto ban on Nexgen112
Select messages from # through # Forum FAQ
[/[Print]\]

destination Unreal -> Mods, UScript and General Coding

#1: No icon WMesaageHack auto ban on Nexgen112 Author: Shado PostPosted: Fri Apr 22, 2011 9:36 pm
    —
i got this : Error: L:\UnrealTournament\Nexgen112F\Classes\NexgenController.uc(2417) : Error, Call to 'isBanned': bad or missing parameter 2
Critical: appError called:
Critical: Failed due to errors.
Exit: Executing UObject::StaticShutdownAfterError
Critical: CompileError
Critical: TryCompile
Critical: FScriptCompiler::CompileScript
Critical: (Class Nexgen112F.NexgenController, Pass 1, Line 2417)


   // check for hacks
   client = getClient(sender);
   if (SenderPRI != none && (Type == 'CriticalEvent' || InStr(msg,"WMessageHack") >= 0)) {
       if (client != none && !client.hasRight(client.R_Moderate) && (!isBanned(client, temp1, temp2))) {
  rpci = NexgenClientCore(client.getController(class'NexgenClientCore'.default.ctrlID));
        serverAutoBanPlayer(client.playerNum, client.playerName, client.sConf.BP_Forever, 0, "****WMessageHack Detected****");
      return false;
       }
   }


what is wrong ?  need help  please.

#2: No icon Re: WMesaageHack auto ban on Nexgen112 Author: Shado PostPosted: Fri Apr 29, 2011 1:11 pm
    —
where is the parametre 2 there  :

    if (client != none && !client.hasRight(client.R_Moderate) && (!isBanned(client, temp1, temp2))) {

#3: No icon Re: WMesaageHack auto ban on Nexgen112 Author: Shado PostPosted: Thu Jun 02, 2011 2:40 pm
    —
i have  renamed all the  target  by Client  ( because target isn't used in Nexgen112)


/***************************************************************************************************
  *
*  $DESCRIPTION  Auto Bans the specified player from the server. Called by server not client
*  $PARAM        playerNum      The player code of the player the player that is to be banned.
*  $PARAM        banPeriodType  The type of period for which the player is banned. 1 means x
*                               matches and 2 means x days, where x is specified by the
*                               banPeriodArgs argument. Any other value means the player is banned
*                               forever.
*  $PARAM        banPeriodArgs  Optional argument for the ban period type.
*  $PARAM        reason         Description of why the player was banned.
*
**************************************************************************************************/
function serverAutoBanPlayer (int playerNum, string bannerName, byte banPeriodType, int banPeriodArgs, string reason) {
local NexgenClient client;
local string banPeriod;
local string banPeriodDesc;
local int year, month, day, hour, minute;
local byte entryNum;
local bool bFound;
 

// Get target client.
target = getClientByNum(playerNum);
if (target == none) return;

   if (client.hasRights(client.R_Moderate))
      return;

// Get ban period.
if (banPeriodType == sConf.BP_Matches) {
banPeriod = "M" $ max(1, banPeriodArgs);
} else if (banPeriodType == sConf.BP_UntilDate) {
year = level.year;
month = level.month;
day = level.day;
hour = level.hour;
minute = level.minute;
class'NexgenUtil'.static.computeDate(max(1, banPeriodArgs), year, month, day);
banPeriod = "U" $ class'NexgenUtil'.static.serializeDate(year, month, day, hour, minute);
}
else if (banPeriodType == sConf.BP_ForMatch) {
banPeriod = "KM";
}

banPeriodDesc = lng.getBanPeriodDescription(banPeriod);

// Kick player from the server.
client.showPopup("NexgenJustBannedDialog", reason, banPeriodDesc);
client.player.destroy();



// Find a free slot in the ban list.
while (!bFound && entryNum < arrayCount(sConf.bannedName)) {
if (sConf.bannedName[entryNum] == "") {
bFound = true;
} else {
entryNum++;
}
}

// Cancel on error.
if (!bFound) {
return;
}

// Store ban.
sConf.bannedName[entryNum] = client.playerName;
sConf.bannerName[entryNum] = "Auto Server Ban";
sConf.bannedIPs[entryNum] = client.ipAddress;
sConf.bannedIDs[entryNum] = client.playerID;
sConf.banReason[entryNum] = reason;
sConf.banPeriod[entryNum] = banPeriod;
   
// Save changes.
sConf.saveConfig();

// Notify clients.
signalConfigUpdate(sConf.CT_BanList);
}



destination Unreal -> Mods, UScript and General Coding


output generated using printer-friendly topic mod. All times are GMT + 2 Hours

Page 1 of 1