Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-03-28 20:33:48



Reply to topic  [ 4 posts ] 
block ad-hoc chats 
Author Message

Joined: 2018-06-13 23:15:59
Posts: 34
Reply with quote
Can you add the "automatically ignore and leave all conference (ad-hoc)chats" what firestorm have?
to prevent spammers/bots adding us to their chats.
I know I can block the spammer but he make another account and again and again...


2020-04-04 00:06:31
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
No, sorry, this is too specific/exotic a feature. Beside, you can already use a few lines of Lua code to perform auto-muting of conferences initiators if it fancies you. Here is an example (to add to your automation.lua script):
Code:
known_sessions = {}

function OnInstantMsg(session_id, origin_id, session_type, name, text)
    -- If it is not a conference session or it already got dealt with, do not care
    if session_type ~= 2 or known_sessions[session_id] then
        return
    end
    -- Flag this new conference session as already dealt with
    known_sessions[session_id] = true
    -- It is a conference session, mute initiator
    -- NOTE: OnInstantMsg() always receives the legacy name in 'name'
    AddMute(name)
    -- Depending on viewer configuration, the name may get any "Resident"
    -- last name stripped off. Since we mute the initiator by name (because
    -- their UUID is sadly not passed to the viewer by the server when a
    -- conference IM is initiated), we must ensure that any new resident
    -- who got "Resident" as their last name for their avatar (case of all
    -- the griefers that register new avatars) have both "Firstname" and
    -- "Firstname Resident" registered in our mute list...
    if not string.find(name, " ") then
        -- There is no last name, so "name" is "Firstname" and we must add
        -- "Firstname Resident".
        AddMute(name .. " Resident")
    else
        local i = string.find(name, " Resident")
        if i then
            -- "name" is "Firstname Resident" and we must add "Firstname".
            AddMute(string.sub(name, 1, i - 1))
        end
    end
end

You can of course add a global flag to toggle the feature on/off. See the Lua documentation and sample script for how to do it.

I might add a Lua function to close IM sessions in a future release (which would allow to auto-close the conference in the above script).

Beside, I encourage you to abuse-report initiators of such IM conferences: this is always what I do when it happens to me, and I can tell you that LL deals promptly with the griefers using this method. So far and in all cases I could experience myself, the griefer got tired and stopped creating new accounts after a short while.


2020-04-04 08:27:36
Profile WWW

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
With today's release and the added Lua features, you can use:
Code:
known_sessions = {}

function OnInstantMsg(session_id, origin_id, session_type, name, text)
    -- If it is not a conference session or it already got dealt with, do not care
    if session_type ~= 2 or known_sessions[session_id] then
        return
    end
    -- Flag this new conference session as already dealt with
    known_sessions[session_id] = true
    -- If not initiated by a friend, close the session and mute the initiator
    -- NOTE: OnInstantMsg() always receives the legacy name in 'name'
    if not IsAgentFriend(name) then
        CloseIMSession(session_id)
        AddMute(name)
        -- Depending on viewer configuration, the name may get any "Resident"
        -- last name stripped off. Since we mute the initiator by name (because
        -- their UUID is sadly not passed to the viewer by the server when a
        -- conference IM is initiated), we must ensure that any new resident
        -- who got "Resident" as their last name for their avatar (case of all
        -- the griefers that register new avatars) have both "Firstname" and
        -- "Firstname Resident" registered in our mute list...
        if not string.find(name, " ") then
            -- There is no last name, so "name" is "Firstname" and we must add
            -- "Firstname Resident".
            AddMute(name .. " Resident")
        else
            local i = string.find(name, " Resident")
            if i then
                -- "name" is "Firstname Resident" and we must add "Firstname".
                AddMute(string.sub(name, 1, i - 1))
            end
        end
    end
end


2020-04-11 14:04:04
Profile WWW

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
I edited the scripts in my replies above to properly take into account avatar names with "Resident" as the last name.


2020-04-12 09:42:51
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 31 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.