示例#1
0
		public Line(Line line)
		{
			Client = line.Client;
			RawString = line.RawString;
			RawStringParts = line.RawStringParts;
			Prefix = line.Prefix;
			Command = line.Command;
			Target = line.Target;
			Message = line.Message;
		}
示例#2
0
		public Line(IrcClient client, string line)
		{
			RawString = line;
			RawStringParts = line.Split(' ');
			Client = client;

			if (line[0] == ':')
			{
				line = line.Substring(1);
				var prefixDelim = line.Split(new[] { ' ' }, 2);
				Prefix = new User(prefixDelim[0]);

				if (prefixDelim.Length > 1)
				{
					var messageDelim = prefixDelim[1].Split(new[] { ':' }, 2);

					var args = messageDelim[0].Trim().Split(' ');

					Command = args[0];
					if (args.Length > 1)
						Target = args[1];

					if (messageDelim.Length > 1)
						Message = messageDelim[1];
				}
			}
			else
			{
				var messageDelim = line.Split(new[] { ':' }, 2);

				var args = messageDelim[0].Trim().Split(' ');

				Command = args[0];
				if (args.Length > 1)
					Target = args[1];

				if (messageDelim.Length > 1)
					Message = messageDelim[1];
			}
		}
示例#3
0
		public IrcClientUser(IrcClient client)
		{
			Client = client;
		}
示例#4
0
 public IrcClientUser(IrcClient client)
 {
     Client = client;
 }