/// <summary> /// Destroy /// </summary> public virtual void Destroy() { if (IsDestroyed) { return; } Channel = null; _Network = null; destroyed = true; }
/// <summary> /// Part /// </summary> /// <param name="channel"></param> public virtual void Part(Channel channel) { _Protocol.Part(channel.Name, this); }
/// <summary> /// Creates a new user /// </summary> /// <param name="nick">Nick</param> /// <param name="host">Host</param> /// <param name="network">Network</param> /// <param name="ident">Ident</param> /// <param name="server">Server</param> /// <param name="channel">Channel</param> public User(string nick, string host, string ident, Network network, Channel channel) { this.Channel = channel; MakeUser(nick, host, network, ident); }
/// <summary> /// Creates a new instance of channel and insert it to a channel list, do not use this to join a channel, /// this function is used to create a channel object after you join some /// </summary> /// <param name="channel">Channel</param> /// <returns>Instance of channel object</returns> public virtual Channel MakeChannel(string channel) { lock (this.Channels) { Channel previous = GetChannel(channel); if (previous == null) { Channel _channel = new Channel(this); _channel.Name = channel; // this is here for compatibility purpose only, you can ignore warnings _channel.lName = channel.ToLower(); Channels.Add(_channel.LowerName, _channel); return _channel; } else { return previous; } } }