Ejemplo n.º 1
0
        private void OnReceive(HostMask prefix, string command, string[] args)
        {
            if (Received != null)
            {
                IrcEventArgs e = new IrcEventArgs(prefix, command, args);
                Received.Invoke(this, e);
                if (e.Handled)
                {
                    return;
                }
            }

            switch (command)
            {
            case "NICK": OnNick(prefix, args); break;

            case "PING": OnPing(args); break;

            case "001": OnWelcome(args); break;

            case "002": OnYourHost(args); break;

            case "003": OnCreated(args); break;

            case "004": OnMyInfo(args); break;
            }
        }
Ejemplo n.º 2
0
 public IrcEventArgs(HostMask prefix, string command, string[] args)
 {
     Prefix  = prefix;
     Command = command;
     Args    = args;
     Handled = false;
 }
Ejemplo n.º 3
0
 public IrcEventArgs(HostMask prefix, string command, string[] args)
 {
     Prefix = prefix;
     Command = command;
     Args = args;
     Handled = false;
 }
Ejemplo n.º 4
0
 private void OnNick(HostMask prefix, string[] args)
 {
     string oldNick = prefix.Nickname;
     string newNick = args[0];
     if (oldNick.ToLower() == Nickname.ToLower())
         Nickname = newNick;
     Echo("{0} is now known as {1}", oldNick, newNick);
 }
Ejemplo n.º 5
0
        private void OnNick(HostMask prefix, string[] args)
        {
            string oldNick = prefix.Nickname;
            string newNick = args[0];

            if (oldNick.ToLower() == Nickname.ToLower())
            {
                Nickname = newNick;
            }
            Echo("{0} is now known as {1}", oldNick, newNick);
        }
Ejemplo n.º 6
0
        private void OnReceive(HostMask prefix, string command, string[] args)
        {
            if (Received != null)
            {
                IrcEventArgs e = new IrcEventArgs(prefix, command, args);
                Received.Invoke(this, e);
                if (e.Handled)
                    return;
            }

            switch (command)
            {
            case "NICK": OnNick(prefix, args); break;
            case "PING": OnPing(args); break;
            case "001": OnWelcome(args); break;
            case "002": OnYourHost(args); break;
            case "003": OnCreated(args); break;
            case "004": OnMyInfo(args); break;
            }
        }