BetterChat V3 | Discontinued

There is currently a bug for rank checking as it does not use ipairs when iterating over group ranks. It does not store the player’s highest rank and instead only stores the last rank iterated that they happened to also have. This is feature-breaking as it can lead to an incorrect assessment of group roles.


Here is my fix to this problem. @Jumpathy

-- location: MainModule(src).core.permission:79
-- change: Store player's highest group rank to not assign a lower rank

local getGroupPermission = function(userId)
    if(hasGroups) then
        local userGroups = groupsIn.fetch(userId)
        local max
        for groupId,data in pairs(userGroups) do
            if(not groups[groupId]) then
                userGroups[groupId] = nil
            else
                local highestRank
                local currentMax
                for rank,toAssign in pairs(groups[groupId]) do
                    if(data.Rank >= rank and data.Rank > (highestRank or 0)) then
                        currentMax = permissionToNumber(toAssign)
                        highestRank = rank
                    end
                end
                if((currentMax or -1) > (max or 0)) then
                    max = currentMax
                end
            end
        end
        return max
    else
        return {}
    end
end

Updating Manually - Not Recommended

:warning: If you want to fix this for yourself, please go to BetterChatV3.Config.Loader and set inDevelopment to true. You then will need to install the source of BetterChatV3 into ServerScriptService do not rename it! Then, go into MainModule.core.permission and on line 79 replace the getGroupPermission function with the one I provided.

I would not recommend doing this as this will most likely be pushed to the main BetterChatV3 and putting your source in development means it no longer receives updates!

1 Like

Can you provide the original code so in my PMs so I can compare to fully understand what I did wrong? Also thank you so much for that! It really does help, I’ll message my friend tonight and we’ll work on updating it.

2 Likes

Here is the commit difference.
image

1 Like

I suspected something like this would be the case, as it seemed a little off that it would ignore some ranks. I never would have guessed that changing a single line of code would fix it!

Thank you so much for looking into it, I’ll be waiting for the fix to come out in production.
The game that we’re using this in isn’t public right now so it’s not a huge deal, but I know that this fix is crucial for other projects as well.

2 Likes

Just amazing work i love it! Continue your works.

1 Like

@Jumpathy Just curious, when will the group rank fix be pushed into production? Thanks again for making such a great resource, I’ve donated R$5000 to help support it!

I don’t intend to pressure you, it’s just that some of my developers are a little annoyed by their tags being off :sweat_smile:

1 Like

Hey, there is a way to mute, unmute someone ? Or it can be done with a admin like adonis ?

Thank you so much! I’m waiting for my friend to respond to my texts to update it.

Can you elaborate on this please? I’ve created a way like the default chat where you can /mute people and then a full mute with attributes.

Just make something like permissions to mute, unmute, tempmute and some image integration like past image link and it load it ? This would be cool.

Update

  • Fixed user tag order (thanks @alexinite)
  • Fixed whispers
  • Added systemMessage function to server

Have a great day!

2 Likes

Planning an update to implement potentially:

  • Tags module for developers
  • Individual user fonts
  • Maybe an error when the filter is failing instead of all underlines?

PM me any feature requests or bugs to fix!

This is great! I just wanted to let you know team chat is a bit buggy, and I was wondering if your going to be fixing that so it can be in that top menu area where the main chat is if you know what I mean, and work if you see what I am at.

1 Like

ive noticed a bug when you switch from chat to chat ie clicking on the main chat button the system puts the default message as the most recent message

I don’t understand.

This is intended behavior.

They’re saying that team chat performs worse than regular chat and would like team chat to get its own channel.

It is on it’s own channel, that’s how it operates internally. The duplicate team bug that wss just patched happened because I had failed to remove speakers from the team channel.


anyone have this problem i don’t know where its located at only apears after one person sends a message and never goes away ingame

image
seems to be a bug with using the viewport render instead of player avatar it creates a new one each message but u can see the name since its in replicated storage
maybe make it hide the name ?

image
the one inplayer gui stacks over and over the more messages are send

cheesy fix would be to rename the “Head” to something else “head” so it doesn’t show the name above it in workspace

1 Like

I don’t actually know why it shows up in workspace, it’s not supposed to. Maybe setting the name to “ “ internally may end up helping.