protected void OnClientMoved(TS3QueryLib.Core.Server.Notification.EventArgs.ClientMovedEventArgs args) { if (ClientMoved != null) { ClientMoved(this, args); } }
/// <summary> /// If a client moves on the server this event will fire. /// This checks if the user in the event is a user in your channel and will either remove or update /// </summary> private void Notifications_ClientMoved(object sender, TS3QueryLib.Core.Server.Notification.EventArgs.ClientMovedEventArgs e) { lock (ThreadLocker) { // API.Log(API.LogType.Debug, "Teamspeak.ddl: ClientMoved Event - " + e.ClientId + " " + e.TargetChannelId); if (currentUser.ClientId == e.ClientId || e.TargetChannelId == currentUser.ChannelId) { if (ThreadPool.QueueUserWorkItem(new WaitCallback(updateOutput))) { API.Log(API.LogType.Debug, "Teamspeak.ddl: UpdateOutput queued"); } else { API.Log(API.LogType.Debug, "Teamspeak.ddl: Failed to queue UpdateOutput"); } //queue the update so that we can get other notifications //updateOutput(); } else { if (ChannelClientList.ContainsKey(e.ClientId)) { //event clientID is in channelClientList cache if (e.TargetChannelId != currentUser.ChannelId) { //event client ID left your channel, remove from cache ChannelClientList.Remove(e.ClientId); //API.Log(API.LogType.Debug, "Teamspeak.ddl: ClientMoved Event - " + e.ClientId + " removed , count:"+ChannelClientList.Count); updateChannelClientsStringOutput(); } } } } }
private void Notifications_ClientMoved(object sender, TS3QueryLib.Core.Server.Notification.EventArgs.ClientMovedEventArgs e) { var clientInfo = this.ServerQueryConnection.QueryRunner.GetClientInfo(e.ClientId); logger.Debug("Client changed channel! His name was {0}", clientInfo.Nickname); }
private void HandleClientMoved(CommandParameterGroupList parameterGroupList) { TS3QueryLib.Core.Server.Notification.EventArgs.ClientMovedEventArgs eventArgs = new TS3QueryLib.Core.Server.Notification.EventArgs.ClientMovedEventArgs(parameterGroupList); OnClientMoved(eventArgs); }
private void onClientMoved(object sender, TS3QueryLib.Core.Server.Notification.EventArgs.ClientMovedEventArgs e) { //TidyChannels((int)e.TargetChannelId, (int)e.ClientId); UpdateUserByClientId(e.ClientId); }
private void HandleClientMoved(CommandParameterGroupList parameterGroupList) { TS3QueryLib.Core.Server.Notification.EventArgs.ClientMovedEventArgs eventArgs = new TS3QueryLib.Core.Server.Notification.EventArgs.ClientMovedEventArgs(parameterGroupList); OnClientMoved(eventArgs); }