Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Results 1 to 2 of 2
  1. #1
    Join Date
    August 2015
    Posts
    14

    [LUA] Multiple Modules Listening to Same Event?

    Hello Scripters, Developers and readers,

    I just noticed, that when I try binding an event to two different LUA Scripts, it will only be registered to the first LUA Module.

    Example:
    Script1:
    Code:
    local function onClientMoveEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moveMessage)
    	ts3.printMessage(ts3.getCurrentServerConnectionHandlerID(), "TESTA onClientMoveEvent" , 1)
    end
    
    local registeredEvents = {
    	onClientMoveEvent = TESTA.onClientMoveEvent
    }
    
    ts3RegisterModule("TESTA", registeredEvents)

    Script2:
    Code:
    local function onClientMoveEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moveMessage)
    	ts3.printMessage(ts3.getCurrentServerConnectionHandlerID(), "TESTB onClientMoveEvent" , 1)
    end
    
    local registeredEvents = {
    	onClientMoveEvent = TESTB.onClientMoveEvent
    }
    
    ts3RegisterModule("TESTB", registeredEvents)
    Now, if I activate both Script modules, only the first active will trigger the event, the second one won't.
    Is this a bug or intended functionality?

    Thanks in advance

  2. #2
    Join Date
    July 2015
    Posts
    3
    I was also wondering the same thing. Can anyone give this a reply?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Listening all event
    By Toine in forum Suggestions and Feedback
    Replies: 1
    Last Post: April 18th, 2014, 10:39 PM
  2. Listening to multiple channels simultaneously
    By spencercw in forum Android
    Replies: 0
    Last Post: March 11th, 2014, 11:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •