|
@@ -499,6 +499,21 @@ int mapif_parse_CreateParty(int fd, int account_id, int char_id, char *name, cha
|
|
|
mapif_party_created(fd,account_id,char_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_party_created(fd,account_id,char_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_party_created(fd,account_id,char_id,NULL);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
p= aCalloc(1, sizeof(struct party));
|
|
|
|
|
|
memcpy(p->name,name,NAME_LENGTH);
|