Merge branch 'master' into system-user-color

This commit is contained in:
Dan Balasescu 2019-08-08 19:02:24 +09:00 committed by GitHub
commit bb90a273ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 2 deletions

View File

@ -213,8 +213,27 @@ public void PostCommand(string text, Channel target = null)
PostMessage(content, true);
break;
case "join":
if (string.IsNullOrWhiteSpace(content))
{
target.AddNewMessages(new ErrorMessage("Usage: /join [channel]"));
break;
}
var channel = availableChannels.Where(c => c.Name == content || c.Name == $"#{content}").FirstOrDefault();
if (channel == null)
{
target.AddNewMessages(new ErrorMessage($"Channel '{content}' not found."));
break;
}
JoinChannel(channel);
CurrentChannel.Value = channel;
break;
case "help":
target.AddNewMessages(new InfoMessage("Supported commands: /help, /me [action]"));
target.AddNewMessages(new InfoMessage("Supported commands: /help, /me [action], /join [channel]"));
break;
default:

View File

@ -313,6 +313,9 @@ private void revertResult(JudgementResult result)
/// <summary>
/// Applies the score change of a <see cref="JudgementResult"/> to this <see cref="ScoreProcessor"/>.
/// </summary>
/// <remarks>
/// Any changes applied via this method can be reverted via <see cref="RevertResult"/>.
/// </remarks>
/// <param name="result">The <see cref="JudgementResult"/> to apply.</param>
protected virtual void ApplyResult(JudgementResult result)
{
@ -357,7 +360,7 @@ protected virtual void ApplyResult(JudgementResult result)
}
/// <summary>
/// Reverts the score change of a <see cref="JudgementResult"/> that was applied to this <see cref="ScoreProcessor"/>.
/// Reverts the score change of a <see cref="JudgementResult"/> that was applied to this <see cref="ScoreProcessor"/> via <see cref="ApplyResult"/>.
/// </summary>
/// <param name="result">The judgement scoring result.</param>
protected virtual void RevertResult(JudgementResult result)