Advertisement
Guest User

Untitled

a guest
Nov 15th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     _loc1.applyOutputCensorship = function (sText)
  2.     {
  3.         if (this.api.datacenter.Player.isAuthorized)
  4.         {
  5.             return (true);
  6.         } // end if
  7.         if (!this.api.lang.getConfigText("CENSORSHIP_ENABLE_OUTPUT"))
  8.         {
  9.             return (true);
  10.         } // end if
  11.         this.initCensorDictionnary();
  12.         var _loc3 = -1;
  13.         var _loc4 = 0;
  14.         var _loc5 = -1;
  15.         var _loc6 = this.avoidPonctuation(sText.toUpperCase()).split(" ");
  16.         for (var i in _loc6)
  17.         {
  18.             if (this._oCensorDictionnary[_loc6[i]] != undefined)
  19.             {
  20.                 if (Number(this._oCensorDictionnary[_loc6[i]].weight) > _loc3)
  21.                 {
  22.                     _loc3 = Number(this._oCensorDictionnary[_loc6[i]].weight);
  23.                     _loc4 = Number(this._oCensorDictionnary[_loc6[i]].id);
  24.                 } // end if
  25.                 continue;
  26.             } // end if
  27.             if (this._bUseInWordCensor)
  28.             {
  29.                 for (var j in this._oCensorDictionnary)
  30.                 {
  31.                     _loc5 = _loc6[i].indexOf(j);
  32.                     if (_loc5 != -1 && this._oCensorDictionnary[j].parseWord)
  33.                     {
  34.                         if (Number(this._oCensorDictionnary[j].weight) > _loc3)
  35.                         {
  36.                             _loc3 = Number(this._oCensorDictionnary[j].weight);
  37.                             _loc4 = Number(this._oCensorDictionnary[j].id);
  38.                         } // end if
  39.                     } // end if
  40.                 } // end of for...in
  41.             } // end if
  42.         } // end of for...in
  43.         if (_loc3 >= this.api.lang.getConfigText("SEND_CENSORSHIP_SINCE"))
  44.         {
  45.             this.api.network.Basics.sanctionMe(_loc3, _loc4);
  46.         } // end if
  47.         if (_loc3 > 0)
  48.         {
  49.             this.api.kernel.showMessage(undefined, this.api.lang.getText("PLEASE_RESTRAIN_TO_A_POLITE_VOCABULARY"), "ERROR_CHAT");
  50.             return (false);
  51.         } // end if
  52.         return (true);
  53.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement