コード例 #1
0
        protected override void BuildHandler(object sender, IrcEventArgs e)
        {
            if (!MessageHandlerHelper.MatchesNick(e.Data.Message, this._nick))
            {
                return;
            }

            if (e.Data.Message.IndexOf(KillKeyword) != -1)
            {
                e.Data.Irc.RfcDie();
                e.Data.Irc.Disconnect();
            }
        }
コード例 #2
0
        protected override void BuildHandler(object sender, IrcEventArgs e)
        {
            if (!MessageHandlerHelper.MatchesNick(e.Data.Message, this._nick))
            {
                return;
            }

            string response = CommandRegistry.ExecuteSync(e.Data.Message);

            if (e.Data.Irc.JoinedChannels.Count > 0)
            {
                e.Data.Irc.SendMessage(SendType.Message, e.Data.Irc.JoinedChannels[0], response);
            }
        }