예제 #1
0
 public void HandleCommand(IRCServer server, string command, IncomingMessage msg)
 {
     if (msg.HasMessage())
     {
         server.Write("QUIT :" + msg.Message);
     }
     else
     {
         server.Write("QUIT :Bye!");
     }
     server.Flush();
     server.Dispose();
 }
예제 #2
0
 public void HandleCommand(IRCServer server, string command, IncomingMessage msg)
 {
     if (msg.HasMessage())
     {
         server.Write("QUIT :" + msg.Message);
     }
     else
     {
         server.Write("QUIT :Bye!");
     }
     server.Flush();
     server.Dispose();
 }
예제 #3
0
        public void Handle(IncomingMessage msg)
        {
            IRCServer server = msg.Server;
            string    target = msg.Target;

            if (server.GetChannel(target).Reconnect)
            {
                Timer t = new Timer((obj) =>
                {
                    server.Write("JOIN " + target);
                    server.Flush();
                }, null, 5000, 0);
            }
        }
예제 #4
0
        public void Handle(IncomingMessage msg)
        {
            IRCServer server = msg.Server;

            if (msg.Command.Equals("001"))
            {
                foreach (IRCChannel chan in server.GetChannels())
                {
                    server.Write("JOIN " + chan.Channel);
                }

                server.Write("PRIVMSG NICKSERV :IDENTIFY " + server.Pass);
                server.Flush();
                server.Connected = true;
            }
            else if (msg.Raw.Contains("No more connections allowed from your host via this connect class"))
            {
                server.Dispose();
            }
        }