private void OnIRCReplyNoTopic(string[] tokens, string message) { IRCTopicEvent topic = new IRCTopicEvent(); topic.Mode = IRCTopicEvent.eModeType.no_topic; topic.Channel = tokens[3]; topic.Message = message; DispatchEvent(topic); }
private void OnIRCReplyTopicSetBy(string[] tokens) { IRCTopicEvent topic = new IRCTopicEvent(); topic.Mode = IRCTopicEvent.eModeType.set_by; topic.Channel = tokens[3]; topic.Message = tokens[4] + ' ' + tokens[5]; DispatchEvent(topic); }
private void OnIRCTopic(string[] tokens, string message) { IRCUser user = IRCUser.GetUserFromAddress(tokens[0].Substring(1)); IRCTopicEvent topic = new IRCTopicEvent(); IRCTopicEvent topicBy = new IRCTopicEvent(); DateTime time = DateTime.Now; topic.Mode = IRCTopicEvent.eModeType.topic; topicBy.Mode = IRCTopicEvent.eModeType.set_by; topic.Channel = topicBy.Channel = tokens[2]; topic.Message = message; topicBy.Message = user.Nick + " " + (time.Ticks / 1000).ToString(); DispatchEvent(topic); DispatchEvent(topicBy); }
private void TopicEventHandler(IRCEvent e) { IRCTopicEvent topicEvent = (IRCTopicEvent)e; switch (topicEvent.Mode) { case IRCTopicEvent.eModeType.set_by: LogText("[mod set, channel=" + topicEvent.Channel + "] " + topicEvent.Message); break; case IRCTopicEvent.eModeType.no_topic: LogText("[no topic set, channel=" + topicEvent.Channel + "] " + topicEvent.Message); break; case IRCTopicEvent.eModeType.topic: LogText("[topic set, channel=" + topicEvent.Channel + "] " + topicEvent.Message); break; } }
private void OnIRCReplyTopic(string[] tokens, string message) { IRCTopicEvent topic = new IRCTopicEvent(); topic.Mode = IRCTopicEvent.eModeType.topic; topic.Channel = tokens[3]; topic.Message = message; DispatchEvent(topic); }