Exemple #1
0
        public override void Send(string t)
        {
            var line = IrcLine.Parse(t);

            if ((line.Message.Equals("PRIVMSG", StringComparison.OrdinalIgnoreCase) || line.Message.Equals("NOTICE", StringComparison.OrdinalIgnoreCase)) &&
                (line.Parameters[0] == "#" || IrcStringComparer.RFC1459.Equals(line.Parameters[0], "User")))
            {
                // Emulate a channel message to # or PM to 'User' by sticking it on the console.
                writeMessage(line.Parameters[1]);
            }
        }
Exemple #2
0
        public override void Send(string t)
        {
            if (this.State != IrcClientState.Online)
            {
                return;
            }
            ConsoleUtils.WriteLine("%cDKGRAY{0} %cDKRED<<%cDKGRAY {1}%r", this.Address, t.Replace("%", "%%"));

            var line = IrcLine.Parse(t);

            if ((line.Message.Equals("PRIVMSG", StringComparison.OrdinalIgnoreCase) || line.Message.Equals("NOTICE", StringComparison.OrdinalIgnoreCase)) && (line.Parameters[0] == "#" ||
                                                                                                                                                              IrcStringComparer.RFC1459.Equals("#Lobby", line.Parameters[0]) ||
                                                                                                                                                              IrcStringComparer.RFC1459.Equals("#BattleRoom", line.Parameters[0]) ||
                                                                                                                                                              IrcStringComparer.RFC1459.Equals(this.Target.Nickname, line.Parameters[0])))
            {
                // Emulate a channel message or PM to the target by sending it over DCC.
                this.SendSub(line.Parameters[1].Replace("\u000F", "\u000F\u000312,99"));
            }
        }