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

Feature Request #68

Closed
ihatemagic opened this issue Oct 22, 2020 · 3 comments · Fixed by #69
Closed

Feature Request #68

ihatemagic opened this issue Oct 22, 2020 · 3 comments · Fixed by #69
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@ihatemagic
Copy link

Description:
Improve the Nickname feature for MBSync. Right now, Nicknames are only saved if players are banned while on the server or if they recently left. If I use ban on the ULX Ban tab, I can put in a nickname for the player, and it will show up on the list with a nickname. However, on MBSync, the nickname will only show "None Given." It would be great to have MBSync also use the nickname from the ULX ban function on the ban tab. Another great feature would be to be able to change the Nickname, as it is currently locked like SteamID.

Usage Cases:
Reading through a list of bans, it makes it easier to identify a player by name.

Optional: Alternatives
Create a feature that syncs bans already in place, including all bans before MSync2 was installed.

@ihatemagic ihatemagic added the enhancement New feature or request label Oct 22, 2020
@ApertureDevelopment
Copy link
Member

What you are describing is the intended fallback if the user has not been found in the MSync database. In case a user gets banned but hasn't been created yet ( meaning they haven't joined the server while MSync was installed ), a placeholder user gets created and then banned. The issue here is that I cannot know the nickname of the user you are banning before they have joined once, so instead of filling in a Nickname it simply sets the nickname to "None Given".

As for changing the nickname, I need to think about that.

As for the alternative request, MBSync 1.3.2 comes with a import and export ban command, allowing you to import bans from ULX as well as export them to ULX. You can find a description about that feature in the latest update message here: https://github.com/Aperture-Development/MSync-2/releases/tag/v1.3.0

@ApertureDevelopment ApertureDevelopment self-assigned this Oct 23, 2020
@ihatemagic
Copy link
Author

I see -- I did not realize there is an export/import ban, thank you for bringing that to my attention! However, when I attempted use the import command, it created this error.


Please include this in a Bug report:

Column 'user_id' cannot be null

I think this happens if MBSync is trying to add a ban to a SteamID that doesn't exist on tbl_users. Here is the query:

transactions[k] = MSync.DBServer:prepare( [[
INSERT INTO tbl_mbsync (user_id, admin_id, reason, date_unix, length_unix, server_group)
VALUES (
(SELECT p_user_id FROM tbl_users WHERE steamid=?),
(SELECT p_user_id FROM tbl_users WHERE steamid=?),
?, ?, ?,
(SELECT p_group_id FROM tbl_server_grp WHERE group_name=?)
);
]] )

@ApertureDevelopment
Copy link
Member

Oh, it seems that I have forgotten to add the transaction for creating the user in the first place. The function was intended to, create the user if it doesn't exist and then add the ban to the database. This needs to be fixed

@ApertureDevelopment ApertureDevelopment added the bug Something isn't working label Oct 23, 2020
ApertureDevelopment added a commit that referenced this issue Oct 23, 2020
Fixed the bug described in #68 where the ban import would fail if the user was not previously created in our database
@ApertureDevelopment ApertureDevelopment linked a pull request Dec 14, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants