public WhisperRequestEventArgs(TwitchTags tags, string user, string requestName, string requestValue, string raw) : base(tags, user, string.Format("{0} {1}", requestName, requestValue), raw) { this.RequestName = requestName; this.RequestValue = requestValue; }
public PrivRequestEventArgs(TwitchTags tags, string user, string channel, string requestName, string requestValue, string message, string raw) : base(tags, user, channel, message, raw) { this.RequestName = requestName; this.RequestValue = requestValue; }
private void CreateMessageAndRaise(ITwitchClient client, string tags, string user, string message, string raw) { TwitchTags twitchTags = new TwitchTags(tags); WhisperEventArgs e = new WhisperEventArgs(twitchTags, user, message, raw); client.OnEvent(e); }
private void CreateMessageAndRaise(ITwitchClient client, string tags, string user, string channel, string message, string raw) { TwitchTags twitchTags = new TwitchTags(tags); PrivEventArgs e = new PrivEventArgs(twitchTags, user, channel, message, raw); client.OnEvent(e); }
public AbstractUserMessageEventArgs(TwitchTags tags, string user, string message, string raw) { this.tags = tags; this.User = user; this.Message = message; this.Raw = raw; }
public AbstractOperationRequestEventArgs(TwitchTags tags, string user, string operation, string requestName, string requestValue, string raw) : base(tags, user, string.Format("!op {0} {1} {2}", operation, requestName, requestValue), raw) { this.Operation = operation; this.RequestName = requestName; this.RequestValue = requestValue; }
private void CreateRequestAndRaise(ITwitchClient client, string tags, string user, string message, string raw) { Regex r = new Regex(requestRegex); MatchCollection mc = r.Matches(message); if (mc.Count == 1) { string requestName = string.Empty; string requestValue = string.Empty; GroupCollection gc = mc[0].Groups; requestName = gc[1].Value; requestValue = gc[2].Value; TwitchTags twitchTags = new TwitchTags(tags); WhisperRequestEventArgs e = new WhisperRequestEventArgs(twitchTags, user, requestName, requestValue, raw); client.OnEvent(e); } else { CreateMessageAndRaise(client, tags, user, message, raw); } }
public InfoOperationRequestEventArgs(TwitchTags tags, string user, string requestName, string requestValue, string raw) : base(tags, user, "info", requestName, requestValue, raw) { }
public EditOperationRequestEventArgs(TwitchTags tags, string user, string requestTags, string requestName, string requestValue, string raw) : base(tags, user, "edit", requestName, requestValue, raw) { this.requestTags = new TwitchTags(requestTags); }
public DeleteOperationRequestEventArgs(TwitchTags tags, string user, string requestName, string requestValue, string raw) : base(tags, user, "delete", requestName, requestValue, raw) { }
public CancelOperationRequestEventArgs(TwitchTags tags, string user, string requestName, string requestValue, string raw) : base(tags, user, "cancel", requestName, requestValue, raw) { }
public void CreateEventAndRaise(ITwitchClient client, string raw) { Regex r = new Regex(AcceptingRegex); MatchCollection mc = r.Matches(raw); if (mc.Count == 1) { GroupCollection gc = mc[0].Groups; string rawTags, user, operation, opTags, requestName, requestValue; TwitchTags tags; if (!string.IsNullOrEmpty(gc[1].Value)) { rawTags = gc[1].Value; tags = new TwitchTags(rawTags); user = gc[2].Value; operation = gc[3].Value; opTags = gc[4].Value; requestName = gc[5].Value; requestValue = gc[6].Value; } else { rawTags = gc[7].Value; tags = new TwitchTags(rawTags); user = gc[8].Value; operation = "edit"; opTags = string.Empty; requestName = gc[9].Value; requestValue = gc[10].Value; } if (operation.Equals("add", StringComparison.CurrentCultureIgnoreCase)) { AddOperationRequestEventArgs e = new AddOperationRequestEventArgs(tags, user, opTags, requestName, requestValue, raw); if (RequestUtils.IsModOrBroadcaster(e)) { client.OnEvent(e); } } else if (operation.Equals("cancel", StringComparison.CurrentCultureIgnoreCase)) { CancelOperationRequestEventArgs e = new CancelOperationRequestEventArgs( tags, user, requestName, requestValue, raw); if (RequestUtils.IsModOrBroadcaster(e)) { client.OnEvent(e); } } else if (operation.Equals("delete", StringComparison.CurrentCultureIgnoreCase)) { DeleteOperationRequestEventArgs e = new DeleteOperationRequestEventArgs( tags, user, requestName, requestValue, raw); if (RequestUtils.IsModOrBroadcaster(e)) { client.OnEvent(e); } } else if (operation.Equals("edit", StringComparison.CurrentCultureIgnoreCase)) { EditOperationRequestEventArgs e = new EditOperationRequestEventArgs( tags, user, opTags, requestName, requestValue, raw); if (RequestUtils.IsModOrBroadcaster(e)) { client.OnEvent(e); } } else if (operation.Equals("info", StringComparison.CurrentCultureIgnoreCase)) { InfoOperationRequestEventArgs e = new InfoOperationRequestEventArgs( tags, user, requestName, requestValue, raw); if (RequestUtils.IsModOrBroadcaster(e)) { client.OnEvent(e); } } } }
public WhisperEventArgs(TwitchTags tags, string user, string message, string raw) : base(tags, user, message, raw) { }
internal PrivEventArgs(TwitchTags tags, string user, string channel, string message, string raw) : base(tags, user, message, raw) { this.Channel = channel; }