public void Connect() { using (var irc = new TcpClient(Server, Port)) { irc.SendBufferSize = Client.BufferSize; irc.ReceiveBufferSize = Client.BufferSize; using (var client = new Client(irc.GetStream())) { client.Pass(Password); client.User(Environment.UserName, InitUsermode, RealName); client.Nick(Nick); client.Mode(Nick, Usermode); Thread.Sleep(SendDelay * 3); client.Join(Channel, string.Empty); client.MessageReceived += Trigger; PasteSetup(client); FunBotsSetup(client); client.Listen(); } irc.Client.Close(SendDelay); } }
void Connect() { irc = new TcpClient(Server, Port); irc.SendBufferSize = Client.BufferSize; irc.ReceiveBufferSize = Client.BufferSize; client = new Client(irc.GetStream()); client.Pass(Password); client.User(Username, InitUsermode, RealName); client.Nick(Username); client.Mode(Username, Usermode); Thread.Sleep(SendDelay * 3); client.Join(Channel, string.Empty); PasteSetup(); FunBotsSetup(); }