Unreal Tournament 99
http://unrealtournament.99.free.fr/forum/

***Tuto*** BannerName on Nexgenbanneddialog
http://unrealtournament.99.free.fr/forum/viewtopic.php?f=9&t=1332
Page 1 sur 1

Auteur:  medor [ 27 Mai 2011, 21:47 ]
Sujet du message:  ***Tuto*** BannerName on Nexgenbanneddialog

Letylove49 a écrit:
ok thanks i have fun the way to solve the problem for NextenBanned dialog:

the solution was to add bannerName in the fonction isBanned like this :

Code:
function checkLogin(NexgenClient client) {
   local string password;
   local bool bRejected;
   local string reason;
   local string banReason;
   local string banPeriod;
   local string bannerName;
   local bool allowSpecReconnect;
   local int index;
   local int k0, k1, k2;
   local string cs0, cs1, cs2;
   local name rejectType;
   local string popupWindowClass;
   local string popupArgs[4];
   local string savedPlayerName;



Code:

   // Check for bans.
   if ((!bRejected) && isBanned(client, banReason, banPeriod, bannerName)) {
      bRejected = true;
      rejectType = RT_Banned;
      reason = lng.bannedMsg;
      popupWindowClass = "NexgenBannedDialog";
      popupArgs[0] = banReason;
      popupArgs[1] = banPeriod;
      popupArgs[2] = bannerName;


Code:
/***************************************************************************************************
*
*  $DESCRIPTION  Checks if the specified client is banned on this server.
*  $PARAM        client     The client for which the ban is to be checked.
*  $PARAM        banReason  Description of why the client was banned. 
*  $PARAM        banPeriod  Textual description indicating how long the player is banned.
*  $PARAM         bannerName Name of the player who issued the ban.
*  $REQUIRE      client != none
*  $RETURN       True if the client is banned, false if not.
*  $ENSURE       result == true ? new.banPeriod != "" : true
*
**************************************************************************************************/
function bool isBanned(NexgenClient client, out string banReason, out string banPeriod, out string bannerName) {
   local int banIndex;
   local bool bBanned;
   
   // Get ban entry.
   banIndex = sConf.getBanIndex(client.playerName, client.ipAddress, client.playerID);
   
   // Check if player is banned and the ban hasn't expired.
   if (banIndex >= 0) {
      if (sConf.autoUpdateBans) {
         if (sConf.updateBan(banIndex, client.ipAddress, client.playerID)) {
            // Ban entry was changed, update dynamic config data checksum & notify clients.
            signalConfigUpdate(sConf.CT_BanList);
         }
      }
      banReason = sConf.banReason[banIndex];
      banPeriod = lng.getBanPeriodDescription(sConf.banPeriod[banIndex]);
      bannerName= sConf.bannerName[banIndex];
      bBanned = !sConf.isExpiredBan(banIndex);
   }
   
   // Return result.
   return bBanned;
}




thanks for your Help

here the result of my modif.

]

Page 1 sur 1 Heures au format UTC + 1 heure
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/