• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

serverGroupAdded / serverGroupRemoved dont work on big Teamspeaks

GowLi

Member
Hello, the following Code work greate on a localhost Teamspeak, but on a big Teamspeak (250+ User) sometimes (every ~15 try) the Bot didn't react to this Listeners.

JavaScript:
event.on('serverGroupAdded', function(ev){
    if(ev.serverGroup != null) {
        if (config.userReadyServergroup == ev.serverGroup.id()) {
            if (getUserOnList(ev.client) == false) {
                addUserOnList(ev.client);
            }
        }
    }
});

the same for the serverGroupRemoved event.
 

TwentyFour

BinusSot Junkie
V.I.P.
Contributor
Insider
Hard to debug a script for you, when you don't provide the full code. I mean I have no idea, what your script is possibly doing in getUserOnList() and addUserOnList().
So if you can reproduce it, I would try to check till which point you code gets executed properly, or if the bot doesn't even register the whole event.
 

GowLi

Member
The functions work great, i had also something like this:
Code:
event.on('serverGroupAdded', function(ev){
    engine.log("serverGroupAdded"); //dont react (every ~15 try)
    if(ev.serverGroup != null) {
        if (config.userReadyServergroup == ev.serverGroup.id()) {
            if (getUserOnList(ev.client) == false) {
                addUserOnList(ev.client);
            }
        }
    }
});

and the Bot dont print sometimes the log (every ~15 try)
 

GowLi

Member
I now do:
JavaScript:
event.on('serverGroupAdded', function(ev){
    engine.log("serverGroupAdded"); //dont react (every ~15 try)
    if(ev.serverGroup != null) {
        if (config.userReadyServergroup == ev.serverGroup.id()) {
            if (getUserOnList(ev.client) == false) {
                addUserOnList(ev.client);
            }
        }
    }
});
event.on('serverGroupAdded', function(ev){
    engine.log("serverGroupAdded"); //dont react (every ~15 try)
    if(ev.serverGroup != null) {
        if (config.userReadyServergroup == ev.serverGroup.id()) {
            if (getUserOnList(ev.client) == false) {
                addUserOnList(ev.client);
            }
        }
    }
});

and now it works great - so i think its a bug
 

TwentyFour

BinusSot Junkie
V.I.P.
Contributor
Insider
Be reminded that if you use like 10 scripts, listening all to various different events (esp. on.clientMove on a TS with 250 User). you can easily flood your own bot. That's what I think is happening with your bot.
Try to just use that single script on a single instance, and I bet, he will react to every event.
 

GowLi

Member
I had inly ine Instance, but if the Bot has a flood, he react slow - but the serverGroupAdd don't react.
 

TwentyFour

BinusSot Junkie
V.I.P.
Contributor
Insider
Wouldn't be 100% sure on everything just being delayed than skipped at some point.

Guess only @flyth can tell you, if it's really a bug or just a result of an overused bot with maybe unoptimised scripts leading to that missbehavior.
 

GowLi

Member
I don't have any unoptimized scripts on my bot, even if I did, it shouldn't lead to a skipping of the listener, but only to a slow response.
 
Top