/// <summary> /// Called when a connection is added /// </summary> /// <param name="e"></param> public void OnConnectionAdded(ConnectionAddedEventArgs e) { EventHandler<ConnectionAddedEventArgs> Handler = ConnectionAddedEvent; // Event will be null if there are no subscribers if (Handler != null) { // Use the () operator to raise the event. Handler(this, e); } }
private void Auth(object sender, ConnectionAddedEventArgs e) { if (e != null) { Connection C = e.Connection; if (C != null) { C.WriteLine("NICK " + C.UserInfo.Nick); C.WriteLine("USER " + C.UserInfo.Nick + " 0 * :" + C.UserInfo.UserInfo); } } }