Esempio n. 1
0
 public void ParseRawLine(string LineToParse)
 {
     AppLog.WriteLine(5, "DATA", m_Network + ": IN: " + LineToParse);
     NetworkLog.WriteLine(LineToParse);
     if (LineToParse.Substring(0, 1) == ":")
     {
         LineToParse = LineToParse.Substring(1);
         string[] ParameterSplit = LineToParse.Split(" ".ToCharArray(), 3, StringSplitOptions.RemoveEmptyEntries);
         string   Sender         = ParameterSplit[0];
         string   Command        = ParameterSplit[1];
         string   Parameters     = ParameterSplit[2];
         // Even though we've logged it, we still need to send it down
         // the line for stuff like PING, CTCP, joining channels, etc.
         Parse(Sender, Command, Parameters);
     }
     else
     {
         string[] Explode = LineToParse.Split(" ".ToCharArray());
         switch (Explode[0].ToUpper())
         {
         case "PING":
             m_ServerComm.Send("PONG " + Explode[1]);
             break;
         }
     }
 }