• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to make Gesior dont let names with ' ?

korff

New Member
Joined
Sep 11, 2009
Messages
78
Reaction score
3
How to make Gesior dont let ppl create characters names with ' ?

example: Druid'Dufor

here is my config-and-functions.php

//names blocked:
$names_blocked = array('gm','cm','administrador','administration',' god', 'tutor');
$first_words_blocked = array('gm ','cm ', 'god ','tutor ', "'", '-');
//name can't contain:
$words_blocked = array('gamemaster', 'game master', 'game-master', " game'master", '--', "''","' ", " '", "'",'- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor');
 
PHP:
$words_blocked = array('gamemaster', 'game master', 'game-master', " game'master", '--', "''",'- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor');
 
PHP:
$words_blocked = array('gamemaster', 'game master', 'game-master', " game'master", '--', "''",'- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor');

Dont WORK! I still can create chars with ' in name, like: Dot'talor

Please help!
 
Last edited by a moderator:
Might be mixing, but there is similar problem on Java, and it can be solved quite easily. Not sure if it will work, but worth a try:

PHP:
$words_blocked = array('gamemaster', 'game master', 'game-master', ' game\'master', '--', '\'','- ', ' -', '-\'', '\'-', 'fuck', 'sux', 'suck', 'noob', 'tutor');

In order for the language to understand that (') is not the closing command but the letter used/filtered, you have to write a backslash, after a backslash it will automatic take the next symbol and have it as in the comment, no matter what that symbol originally has of meaning.

I learned this from my Java programming, so I can not guarantee its the same on php. But tell me if the code works. :)
 
It Workes!

Might be mixing, but there is similar problem on Java, and it can be solved quite easily. Not sure if it will work, but worth a try:

PHP:
$words_blocked = array('gamemaster', 'game master', 'game-master', ' game\'master', '--', '\'','- ', ' -', '-\'', '\'-', 'fuck', 'sux', 'suck', 'noob', 'tutor');

In order for the language to understand that (') is not the closing command but the letter used/filtered, you have to write a backslash, after a backslash it will automatic take the next symbol and have it as in the comment, no matter what that symbol originally has of meaning.

I learned this from my Java programming, so I can not guarantee its the same on php. But tell me if the code works. :)

IT WORKS! Thank you very much!
 
Awesome! My programming studies are finally starting to take effect! (Znote advanced in level).
 
Last edited:
Back
Top