Skip to content

Commit

Permalink
some event fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindgamesnl committed Dec 1, 2024
1 parent f6e65d6 commit f6dadf3
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ public void onClientConnect(VoicechatReadyEvent event) {

@Handler
public void onMembersUpdate(ChannelMembersUpdatedEvent event) {
if (!SETTINGS_STATIC_CHANNELS_SHOW_IN_WEB_UI.getBoolean()) {
return;
}

for (ClientConnection client : getService(NetworkingService.class).getClients()) {
// are they connected and are they in voice chat?
if (client.getRtcSessionManager().isReady()) {
Expand All @@ -212,6 +216,10 @@ public void onMembersUpdate(ChannelMembersUpdatedEvent event) {

@Handler
public void onChannelCreate(ChannelCreatedEvent event) {
if (!SETTINGS_STATIC_CHANNELS_SHOW_IN_WEB_UI.getBoolean()) {
return;
}

for (ClientConnection client : getService(NetworkingService.class).getClients()) {
// are they connected and are they in voice chat?
if (client.getRtcSessionManager().isReady()) {
Expand All @@ -227,6 +235,10 @@ public void onChannelCreate(ChannelCreatedEvent event) {

@Handler
public void onChannelDelete(ChannelDeletedEvent event) {
if (!SETTINGS_STATIC_CHANNELS_SHOW_IN_WEB_UI.getBoolean()) {
return;
}

for (ClientConnection client : getService(NetworkingService.class).getClients()) {
// are they connected and are they in voice chat?
if (client.getRtcSessionManager().isReady()) {
Expand Down

0 comments on commit f6dadf3

Please sign in to comment.