clydelion Posted December 3, 2012 Posted December 3, 2012 I would like to propose adding this to the svn as a quick alternative to /guildbreak, because guild names with spaces are not supported anymore on newer clients. Index: atcommand.c =================================================================== --- atcommand.c (revision 16820) +++ atcommand.c (working copy) @@ -8817,6 +8817,26 @@ #undef MC_CART_MDFY } +/*========================================== + * works like /breakguild "<guild name>" (without the name though) + * This is needed for newer clients as an + * alternative to /guildbreak because support + * for " " in newer clients is dropped. [clydelion] + *------------------------------------------*/ +ACMD_FUNC(breakguild) +{ + struct guild *g; + nullpo_retr(-1, sd); + + if (sd->status.guild_id == 0 || (g = guild_search(sd->status.guild_id)) == NULL || strcmp(g->master,sd->status.name)) { + clif_displaymessage(fd, "Only the guild leader can use this command."); + return -1; + } + + guild_break(sd,g->name); + return 0; +} + /** * Fills the reference of available commands in atcommand DBMap **/ @@ -8827,6 +8847,7 @@ * Command reference list, place the base of your commands here **/ AtCommandInfo atcommand_base[] = { + ACMD_DEF(breakguild), ACMD_DEF2("warp", mapmove), ACMD_DEF(where), ACMD_DEF(jumpto), breakguild.diff 2
Sryx Posted December 3, 2012 Posted December 3, 2012 (edited) Agree!. I don't know if it is working or not, if working it would be nice to add it to the SVN. Keep it up Cheeeerrrss! Edited December 3, 2012 by Rejected
GmOcean Posted December 3, 2012 Posted December 3, 2012 I also agree, been wondering why I failed at breaking guilds lol.
EvilPuncker Posted December 3, 2012 Posted December 3, 2012 if I recall correctly, you no longer need to use quotes when deleting/creating a guild when it got space (same for parties)
Jhedzkie Posted December 3, 2012 Posted December 3, 2012 if I recall correctly, you no longer need to use quotes when deleting/creating a guild when it got space (same for parties) just tried creating a guild with a name having a space, failed. I would like to propose adding this to the svn as a quick alternative to /guildbreak, because guild names with spaces are not supported anymore on newer clients. Index: atcommand.c =================================================================== --- atcommand.c (revision 16820) +++ atcommand.c (working copy) @@ -8817,6 +8817,26 @@ #undef MC_CART_MDFY } +/*========================================== + * works like /breakguild "<guild name>" (without the name though) + * This is needed for newer clients as an + * alternative to /guildbreak because support + * for " " in newer clients is dropped. [clydelion] + *------------------------------------------*/ +ACMD_FUNC(breakguild) +{ + struct guild *g; + nullpo_retr(-1, sd); + + if (sd->status.guild_id == 0 || (g = guild_search(sd->status.guild_id)) == NULL || strcmp(g->master,sd->status.name)) { + clif_displaymessage(fd, "Only the guild leader can use this command."); + return -1; + } + + guild_break(sd,g->name); + return 0; +} + /** * Fills the reference of available commands in atcommand DBMap **/ @@ -8827,6 +8847,7 @@ * Command reference list, place the base of your commands here **/ AtCommandInfo atcommand_base[] = { + ACMD_DEF(breakguild), ACMD_DEF2("warp", mapmove), ACMD_DEF(where), ACMD_DEF(jumpto), had a somewhat similar mod with this one from earlier this year in this post. and I +1 to this too.
lekkereten Posted December 23, 2012 Posted December 23, 2012 Added in r17038, code is not the most optimized but it is well documented and explanatory.
Recommended Posts