コード例 #1
0
ファイル: TsBaseFunctions.cs プロジェクト: yakMM/TS3AudioBot
 /// <summary>Kicks one or more clients specified with clid from their currently joined channel or from the server, depending on <paramref name="reasonId"/>.
 /// The reasonmsg parameter specifies a text message sent to the kicked clients.
 /// This parameter is optional and may only have a maximum of 40 characters.</summary>
 public CmdR KickClient(ClientId[] clientIds, ReasonIdentifier reasonId, string?reasonMsg = null)
 => SendVoid(new TsCommand("clientkick")
 {
     { "reasonid", (int)reasonId },
     { "clid", clientIds },
     { "reasonmsg", reasonMsg },
 });
コード例 #2
0
 /// <summary>
 /// Kicks one or more clients specified with clid from their currently joined channel or from the server, depending on reasonid.
 /// The reasonmsg parameter specifies a text message sent to the kicked clients. This parameter is optional and may only have a maximum of 40 characters.
 /// </summary>
 /// <param name="reason"></param>
 /// <param name="message"></param>
 /// <param name="clientIds"></param>
 /// <returns></returns>
 public Task <ServerQueryBaseResult> ClientKick(ReasonIdentifier reason, string message, params int[] clientIds)
 {
     return(SendCommandAsync(new ServerQueryCommand <ServerQueryBaseResult>(Command.clientkick)
                             .Add(Parameter.reasonid, (int)reason)
                             .Add(Parameter.reasonmsg, message)
                             .Add(Parameter.clid, clientIds)));
 }
コード例 #3
0
 /// <summary>Kicks one or more clients specified with clid from their currently joined channel or from the server, depending on <paramref name="reasonId"/>.
 /// The reasonmsg parameter specifies a text message sent to the kicked clients.
 /// This parameter is optional and may only have a maximum of 40 characters.</summary>
 public CmdR KickClient(ClientIdT[] clientIds, ReasonIdentifier reasonId, string reasonMsg = null)
 => Send <ResponseVoid>(new Ts3Command("clientkick")
 {
     { "reasonid", (int)reasonId },
     { "clid", clientIds },
     { "reasonmsg", reasonMsg },
 });
コード例 #4
0
ファイル: Ts3BaseClient.cs プロジェクト: sertsch1/TS3AudioBot
 /// <summary>Kicks one or more clients specified with clid from their currently joined channel or from the server, depending on <paramref name="reasonId"/>.
 /// The reasonmsg parameter specifies a text message sent to the kicked clients.
 /// This parameter is optional and may only have a maximum of 40 characters.</summary>
 public CmdR KickClient(ClientIdT[] clientIds, ReasonIdentifier reasonId, string reasonMsg = null)
 => Send("clientkick",
         new CommandParameter("reasonid", (int)reasonId),
         new CommandMultiParameter("clid", clientIds));
コード例 #5
0
 public void RegisterNotification(ReasonIdentifier target, ChannelIdT channel)
 => RegisterNotification(TargetTypeString[(int)target], channel);
コード例 #6
0
ファイル: QueryBot.cs プロジェクト: Fearswe/Teamspeak3-Bot
		public Boolean KickClient(int clientID, ReasonIdentifier reasonIdentifier, String reason = "")
		{
			//clientkick clid={clientID} reasonid={4|5} [reasonmsg={text}]
			if (reason != "")
			{
				this.latestError = this.ExecuteCommand(String.Format("clientkick clid={0} reasonid={1} reasonmsg={2}", clientID, reasonIdentifier, EscapeString(reason)));
			}
			else
			{
				this.latestError = this.ExecuteCommand(String.Format("clientkick clid={0} reasonid={1}", clientID, reasonIdentifier));
			}

			return this.latestError.Success;
		}