示例#1
0
 /// <summary>
 /// Parse a single player target string into a connected client.
 /// </summary>
 /// <param name="client">The calling client information.</param>
 /// <param name="targetString">The player target string.</param>
 /// <param name="target">Variable to be set to the <see cref="SMClient"/> object representing the matching client.</param>
 /// <returns><c>true</c> if a match is found; otherwise <c>false</c>.</returns>
 protected bool ParseSingleTargetString(SMClient client, string targetString, out SMClient target)
 {
     return(SMConsoleHelper.ParseSingleTargetString(client?.ClientInfo, targetString, out target));
 }
示例#2
0
 /// <summary>
 /// Parse a player target string into a list of currently connected clients.
 /// </summary>
 /// <param name="client">The <see cref="SMClient"/> object representing the source client.</param>
 /// <param name="targetString">The player target string.</param>
 /// <param name="targets">Will be set to a list of <see cref="SMClient"/> objects representing the matching clients.</param>
 /// <param name="targetName">Will be set to the name of the target, if applicable.</param>
 /// <param name="nameIsPhrase">Will be set to a value indicating whether <paramref name="targetName"/> is a translation phrase.</param>
 /// <returns>The number of matching clients.</returns>
 protected int ParseTargetString(SMClient client, string targetString, out List <SMClient> targets, out string targetName, out bool nameIsPhrase)
 {
     return(SMConsoleHelper.ParseTargetString(client?.ClientInfo, targetString, out targets, out targetName, out nameIsPhrase));
 }