From 44f46558e22a2b6c7287a233767bbcb713e25f55 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 7 Apr 2008 15:10:37 +0000 Subject: Party/guild names can no longer be less then 2 characters long.(bugreport:1328) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12521 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/guild.c | 2 +- src/map/party.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/guild.c b/src/map/guild.c index 8413c5c37..f02deb16c 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -402,7 +402,7 @@ int guild_create(struct map_session_data *sd,char *name) { nullpo_retr(0, sd); - if(sd->status.guild_id) + if(sd->status.guild_id || strlen(name) < 2) { clif_guild_created(sd,1); // すでに所属している return 0; diff --git a/src/map/party.c b/src/map/party.c index 1d59c476e..e4553036e 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -114,6 +114,12 @@ int party_create(struct map_session_data *sd,char *name,int item,int item2) return 0; // "already in a party" } + if(strlen(name) < 2) + { + clif_party_created(sd, 1); + return 0; + } + //Temporarily set to -1 so cannot be spam invited sd->status.party_id = -1; @@ -132,8 +138,6 @@ void party_created(int account_id,int char_id,int fail,int party_id,char *name) if (!sd || sd->status.char_id != char_id) { //Character logged off before creation ack? - if(sd) - sd->status.party_id = 0; if (!fail) //break up party since player could not be added to it. intif_party_leave(party_id,account_id,char_id); return; -- cgit v1.2.3-70-g09d2