maartenl / Land-of-Karchan

Where one can change into a hero with a single swipe of his sword.
http://www.karchan.org
GNU General Public License v3.0
7 stars 3 forks source link

Commands that are guild-based? #215

Closed wastedshame closed 1 year ago

wastedshame commented 1 year ago

To make commands accessible by guild, we used to do this: if (person.guild == "fury")

I changed that to: if (person.getGuild() == "fury");

Because it allowed one command to work.

However, that wasn't the correct fix, as any of the commands I fixed are able to be accessed by anyone, regardless of whether they were in that guild or not.

I've changed it back to how it was before it became broken so that I can try to backtrack and mull over it again.

What is the correct way of making commands accessible by certain guilds?

Also, the method guildinfo2* involves calling up different guilds by guild name to show a list of guild commands. That's where I discovered the problem. The first example no longer worked, and I thought the second did only to discover it doesn't differentiate by guild. It just shows the first bit.

*The method guildinfo2 is longish and references multiple guilds. It worked find prior to the new release, so am unsure if something has changed.

wastedshame commented 1 year ago

Figured out the problem with my correction. Closing this for now.