From be7ffb0d5d36f6f292bfdc779bfd903308c7b439 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Wed, 6 May 2020 10:39:59 -0400 Subject: add params Line() constructor --- Examples/Tokens/Client.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'Examples/Tokens/Client.cs') diff --git a/Examples/Tokens/Client.cs b/Examples/Tokens/Client.cs index 1061986..3dd3933 100644 --- a/Examples/Tokens/Client.cs +++ b/Examples/Tokens/Client.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Net.Sockets; using System.Threading; using IrcTokens; @@ -26,8 +25,8 @@ namespace TokensSample _socket.Connect("127.0.0.1", 6667); while (!_socket.Connected) Thread.Sleep(1000); - Send(new Line {Command = "NICK", Params = new List {"tokensbot"}}); - Send(new Line {Command = "USER", Params = new List {"tokensbot", "0", "*", "real name"}}); + Send(new Line("NICK", "tokensbot")); + Send(new Line("USER", "tokensbot", "0", "*", "real name")); while (true) { @@ -50,16 +49,13 @@ namespace TokensSample switch (line.Command) { case "PING": - Send(new Line {Command = "PONG", Params = line.Params}); + Send(new Line("PONG", line.Params[0])); break; case "001": - Send(new Line {Command = "JOIN", Params = new List {"#test"}}); + Send(new Line("JOIN", "#test")); break; case "PRIVMSG": - Send(new Line - { - Command = "PRIVMSG", Params = new List {line.Params[0], "hello there"} - }); + Send(new Line("PRIVMSG", line.Params[0], "hello there")); break; } } -- cgit 1.4.1