コード例 #1
0
    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);
    }
コード例 #2
0
    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);
    }
コード例 #3
0
    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);
    }
コード例 #4
0
    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;
        }
    }
コード例 #5
0
    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);
    }
コード例 #6
0
    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);
    }
コード例 #7
0
    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);
    }