AutoLayer

AutoLayer

4 Downloads

Needs a check for people asking to leave a specific layer or joining a specific layer

CKozanecki opened this issue ยท 5 comments

commented

When people are asking "Looking for layer XX" or "Looking for layer off XX" types of messages are not processed correctly because someone will be looking for an interaction with that specific layer and we invite even if not on that layer (or worse, when they are asking to leave that layer)

I looked at the code, and I think that something like this could work starting around

self:DebugPrint("Matched trigger", trigger, "in message", msg)

     if addonTable.NWB ~= nil then
            local message = ({ strsplit(" ", msg) })

            for _, v in pairs(message) do
                if tonumber(v) == addonTable.NWB.currentLayer then
                    if string.find(string.lower(msg), "%f[%a]off%f[%A]") then
                    -- asking off the layer you are on, ignore
                        AutoLayer:DebugPrint("Wants off layer " .. v)
                        AutoLayer:DebugPrint("Currently on layer " .. addonTable.NWB.currentLayer)
                        AutoLayer:DebugPrint("Ignoring")
                        return
                    end
                else
                    -- asking for specific layer we are not on, ignore
                        AutoLayer:DebugPrint("Wants specific layer " .. v)
                        AutoLayer:DebugPrint("Currently on layer " .. addonTable.NWB.currentLayer)
                        AutoLayer:DebugPrint("Ignoring")
                        return
                end
            end
        end
commented

I dont see the issue? you can search layers fine using LFL syntax \

commented

When I "LFL 3", nothing happens.

The rest of the server says "looking to get off layer 2" or "looking for any layer except 3" or "looking for layer 7".

If you don't see any issue with auto layering when people are asking off the layer you are on, I guess I'll fork and fix my own version.

commented

i see that most requests dont get flagged as such but i dont have the time to add that without causing too many false positives.

feel free to fork it and make a puill request, ill happily accept contributions

commented

still looking forward to your fork & fix after 9 months though! :)

commented

Closing this as spam, not sure what this is about to this day.