Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _loc1.applyOutputCensorship = function (sText)
- {
- if (this.api.datacenter.Player.isAuthorized)
- {
- return (true);
- } // end if
- if (!this.api.lang.getConfigText("CENSORSHIP_ENABLE_OUTPUT"))
- {
- return (true);
- } // end if
- this.initCensorDictionnary();
- var _loc3 = -1;
- var _loc4 = 0;
- var _loc5 = -1;
- var _loc6 = this.avoidPonctuation(sText.toUpperCase()).split(" ");
- for (var i in _loc6)
- {
- if (this._oCensorDictionnary[_loc6[i]] != undefined)
- {
- if (Number(this._oCensorDictionnary[_loc6[i]].weight) > _loc3)
- {
- _loc3 = Number(this._oCensorDictionnary[_loc6[i]].weight);
- _loc4 = Number(this._oCensorDictionnary[_loc6[i]].id);
- } // end if
- continue;
- } // end if
- if (this._bUseInWordCensor)
- {
- for (var j in this._oCensorDictionnary)
- {
- _loc5 = _loc6[i].indexOf(j);
- if (_loc5 != -1 && this._oCensorDictionnary[j].parseWord)
- {
- if (Number(this._oCensorDictionnary[j].weight) > _loc3)
- {
- _loc3 = Number(this._oCensorDictionnary[j].weight);
- _loc4 = Number(this._oCensorDictionnary[j].id);
- } // end if
- } // end if
- } // end of for...in
- } // end if
- } // end of for...in
- if (_loc3 >= this.api.lang.getConfigText("SEND_CENSORSHIP_SINCE"))
- {
- this.api.network.Basics.sanctionMe(_loc3, _loc4);
- } // end if
- if (_loc3 > 0)
- {
- this.api.kernel.showMessage(undefined, this.api.lang.getText("PLEASE_RESTRAIN_TO_A_POLITE_VOCABULARY"), "ERROR_CHAT");
- return (false);
- } // end if
- return (true);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement