Dankoo
Active Member
- Joined
- Sep 4, 2010
- Messages
- 1,007
- Reaction score
- 27
Hello,
I would like to know how to set an "protection" on Gesior's guild system so it won't allow players to create guild names with first letter as lower case
Here's my script (in media fire cause it overwhelms characters limitation):
guilds.php
There's this name check function on config-and-functions.php, but I don't know if it's neither bad coded, or not inserted in guilds.php script (the function is present in guilds.php, but I don't know if it's working as it should):
I would like to know how to set an "protection" on Gesior's guild system so it won't allow players to create guild names with first letter as lower case
Here's my script (in media fire cause it overwhelms characters limitation):
guilds.php
There's this name check function on config-and-functions.php, but I don't know if it's neither bad coded, or not inserted in guilds.php script (the function is present in guilds.php, but I don't know if it's working as it should):
PHP:
function check_guild_name($name) {
$temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789- ");
if ($temp != strlen($name)) {
return false;
} else {
$ok = "/[a-zA-Z ]{1,60}/";
return (preg_match($ok, $name))? true: false;
}
}