public E <LocalStr> SendMessage(string message, ushort clientId) { if (Ts3String.TokenLength(message) > Ts3Const.MaxSizeTextMessage) { return(new LocalStr(strings.error_ts_msg_too_long)); } return(tsFullClient.SendPrivateMessage(message, clientId).FormatLocal()); }
private void Lib_OnClientMoved(object sender, System.Collections.Generic.IEnumerable <TS3Client.Messages.ClientMoved> e) { foreach (var client in e) { lib.SendPrivateMessage("Hello, you just moved to another channel", client.ClientId); try { lib.Send("clientpoke", new CommandParameter("clid", client.ClientId), new CommandParameter("msg", "Oh,\\sno\\swhat\\sare\\syou\\sdoing?")); } catch (Exception ex) { Log.Write(Log.Level.Warning, string.Format("Exception thrown while trying to poke client #{0}: {1}", client.ClientId, ex.Message)); } } }
public string SendPrivate(int ClientId, [Consume] string Message) { if (!client.Connected) { return("Not connected!"); } client.SendPrivateMessage(Message, (ushort)ClientId); return("Ok"); }