summaryrefslogtreecommitdiff
path: root/src/char/int_guild.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/int_guild.c')
-rw-r--r--src/char/int_guild.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 6747e43e6..3a3dd6529 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -948,6 +948,22 @@ int mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_mem
mapif_guild_created(fd, account_id, NULL);
return 0;
}
+
+ // Check Authorised letters/symbols in the name of the character
+ if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised
+ for (i = 0; i < NAME_LENGTH && name[i]; i++)
+ if (strchr(char_name_letters, name[i]) == NULL) {
+ mapif_guild_created(fd,account_id,NULL);
+ return 0;
+ }
+ } else if (char_name_option == 2) { // letters/symbols in char_name_letters are forbidden
+ for (i = 0; i < NAME_LENGTH && name[i]; i++)
+ if (strchr(char_name_letters, name[i]) != NULL) {
+ mapif_guild_created(fd,account_id,NULL);
+ return 0;
+ }
+ }
+
g = (struct guild *) aCalloc(sizeof(struct guild), 1);
if (g == NULL) {
ShowFatalError("int_guild: CreateGuild: out of memory !\n");