Skip to content

Commit b6e6c27

Browse files
committed
Added possibility to move multiple clients.
See: #25
1 parent 9919364 commit b6e6c27

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

TS3QueryLib.Core.Silverlight/Server/QueryRunner.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2030,6 +2030,31 @@ public SimpleResponse MoveClient(uint clientId, uint channelId, string channelPa
20302030
return ResponseBase<SimpleResponse>.Parse(SendCommand(command));
20312031
}
20322032

2033+
/// <summary>
2034+
/// Moves the clients with the specified ids to the channel specified with id. The password is optional.
2035+
/// </summary>
2036+
/// <param name="clientIds">The client ids.</param>
2037+
/// <param name="channelId">The channel identifier.</param>
2038+
/// <param name="channelPassword">The optional channel password.</param>
2039+
public SimpleResponse MoveClients(IEnumerable<uint> clientIds, uint channelId, string channelPassword = null)
2040+
{
2041+
Command command = CommandName.ClientMove.CreateCommand();
2042+
command.AddParameter("cid", channelId);
2043+
2044+
if (channelPassword != null)
2045+
command.AddParameter("cpw", channelPassword);
2046+
2047+
uint index = 0;
2048+
foreach (uint clientId in clientIds)
2049+
{
2050+
command.AddParameter("clid", clientId, index);
2051+
index++;
2052+
}
2053+
2054+
return ResponseBase<SimpleResponse>.Parse(SendCommand(command));
2055+
}
2056+
2057+
20332058
public SimpleResponse KickClient(uint clientId, KickReason kickReason)
20342059
{
20352060
return KickClient(clientId, kickReason, null);

0 commit comments

Comments
 (0)