Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guild Disband #488

Open
BoozieII opened this issue Aug 25, 2021 · 0 comments
Open

Guild Disband #488

BoozieII opened this issue Aug 25, 2021 · 0 comments
Labels
bug (1.3/OTBR) OtservBR identified bug Unconfirmed Potential issue / bug that is not yet quite confirmed.

Comments

@BoozieII
Copy link

BoozieII commented Aug 25, 2021

I have an issue on my server when a player disbands their guild on the website, it does in fact delete the guild from the website, however it remains on the database. This prevents the same player from creating another guild.

Throws this error:
string(105) "INSERT INTO guilds (name, ownerid, creationdata, motd) VALUES ('test', '91', '1629862047', '');"
(query - SQL error)
Type: voidQuery (voidQuery is used for update, insert or delete from database)

Duplicate entry '91' for key 'guilds_owner_unique'

Or if its the same guild name it will say guild with that name already exists

I think this is the code that does not properly work in guilds.php

if (!$online) {
// Then remove guild rank from every player.
if ($config['ServerEngine'] !== 'TFS_10') foreach ($members as $member) guild_player_leave(user_character_id($member['name']));
else foreach ($members as $member) guild_player_leave_10(user_character_id($member['name']));

               // Remove all guild invitations to this guild
                    if ($inv_count > 0) guild_remove_invites($gidd);
                 // Then remove the guild itself.
                    guild_delete($gidd);
                    header('Location: success.php');
                    exit();
          } else echo '<font color="red" size="4">All members must be offline to disband the guild.</font>';
@Znote Znote added bug (1.3/OTBR) OtservBR identified bug Unconfirmed Potential issue / bug that is not yet quite confirmed. labels Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug (1.3/OTBR) OtservBR identified bug Unconfirmed Potential issue / bug that is not yet quite confirmed.
Projects
None yet
Development

No branches or pull requests

2 participants