internal void ExecuteMute(ushort clientId, bool isMute) { VoicePlugin.Log("{0} {1}", isMute ? "Muting" : "Unmuting", clientId); List <ushort> clients; clients = new List <ushort>(); clients.Add(clientId); clients.Add(0); if (isMute) { Check(Functions.requestMuteClients(ID, clients.ToArray(), "")); } else { Check(Functions.requestUnmuteClients(ID, clients.ToArray(), "")); } }
internal void DoMuteActions() { var clientCurrentChannel = LocalClient.CurrentChannel; if (clientCurrentChannel != IngameChannel) { if (!CanLeaveIngameChannel && !AllowedOutGameChannels.Contains(clientCurrentChannel)) { VoicePlugin.Log("Timer: Local Client left ingame channel while inGame"); LocalClient.JoinChannel(IngameChannel, IngameChannelPassword); } else { // client may be in this channel when ingame. Make sure people are unmuted here GetChannel(clientCurrentChannel).UnmuteAll(); return; } } string retcode = ""; List <ushort> clients; if (_MutedClients.Count > 0) { clients = new List <ushort>(_MutedClients.ToArray()); clients.Add(0); Log("Timer: Muting {0}: {1}", clients.Count, string.Join(",", clients)); Check(Functions.requestMuteClients(ID, clients.ToArray(), retcode)); } if (_UnmutedClients.Count > 0) { clients = new List <ushort>(_UnmutedClients.ToArray()); clients.Add(0); Log("Timer: Unmuting {0}: {1}", clients.Count, string.Join(",", clients)); Check(Functions.requestUnmuteClients(ID, clients.ToArray(), retcode)); } }
internal static void Log(string str, params object[] args) { VoicePlugin.Log(str, args); }