summaryrefslogtreecommitdiff
path: root/src/char/int_guild.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-31 20:37:39 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-31 20:37:39 +0000
commit353b697f724a54e5d4f578b0509d8d6e6959d299 (patch)
tree7f53009c9f9f72347c68f20f66fbf4fe3913f934 /src/char/int_guild.c
parentd0d7cb926f66b1e2dbf7e57291c00c27437dcc07 (diff)
downloadhercules-353b697f724a54e5d4f578b0509d8d6e6959d299.tar.gz
hercules-353b697f724a54e5d4f578b0509d8d6e6959d299.tar.bz2
hercules-353b697f724a54e5d4f578b0509d8d6e6959d299.tar.xz
hercules-353b697f724a54e5d4f578b0509d8d6e6959d299.zip
- Made the char_name_option char_athena.conf setting apply to parties and guilds as well. It cannot be applied to pets yet without adding a change-name-request interserver packet.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6897 54d463be-8e91-2dee-dedb-b68131a5f0ec
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");