/// <summary> /// Initializes a new instance of the <see cref="Channel"/> class. /// </summary> /// <param name="protocol">The protocol.</param> /// <param name="name">The name.</param> public Channel(Protocol protocol, string name) { this.name = name; this.protocol = protocol; users = new UserCollection(); }
// bottens eget navn kendes ikke her, det sættes på i client /// <summary> /// Initializes a new instance of the <see cref="Client"/> class. /// </summary> public Client() { protocol = new Protocol(); protocol.AlternativeNick = altNick; channels = new ChannelCollection( protocol ); protocol.OnChannelUserList += OnChannelUserList; protocol.OnPrivateMessage += protocol_OnPrivateMessage; protocol.OnPublicMessage += protocol_OnPublicMessage; protocol.OnPublicNotice += protocol_OnPublicNotice; protocol.OnPrivateNotice += protocol_OnPrivateNotice; protocol.OnSendToUser += protocol_OnSendToUser; protocol.OnSendToChannel += protocol_OnSendToChannel; protocol.OnSetMode += protocol_OnSetMode; protocol.OnSendNotice += protocol_OnSendNotice; protocol.OnNickChange += protocol_OnNickChange; protocol.Network.OnDisconnect += Network_OnDisconnect; protocol.Network.OnServerMessage += Network_OnServerMessage; protocol.OnMotd += protocol_OnMotd; protocol.OnTopicChange += protocol_OnTopicChange; protocol.OnPublicAction += protocol_OnPublicAction; protocol.OnPrivateAction += protocol_OnPrivateAction; }
/// <summary> /// Initializes a new instance of the <see cref="ChannelCollection"/> class. /// </summary> /// <param name="protocol">The protocol.</param> public ChannelCollection(Protocol protocol) { this.protocol = protocol; }