src/ServerInfo/ChannelTypes.cs
/// <summary>
/// Gets the number of channels left to join with the specified channel prefix.
/// </summary>
/// <param name="ChannelPrefix">Channel prefix</param>
/// <returns>Integer. Number of channels left to join with specified channel prefix.</returns>
/// <remarks>Finds all channels already joined with specified prefix, and substract it from the total number of allowed channels on server.</remarks>
Gets the number of channels left to join with the specified channel prefix.
Gets the number of channels left to join with the specified channel prefix .
public int GetChannelsLeftToJoinByPrefix(char ChannelPrefix)
        {
            string[] strParts = GetPrefix(ChannelPrefix);
            if (strParts != null)
            {
                if (int.Parse(strParts[1]) > 0)
                {
                    int intCurrentChannels = 0;
                    foreach (Channel c in _parent.Channels)
                        if (strParts[0].IndexOf(c.Name[0]) != -1)
                            intCurrentChannels++;
                    return int.Parse(strParts[1]) - intCurrentChannels;
                }
                return 0;
            }
            return -1;
        }
public int GetChannelsLeftToJoinByPrefix ( char ChannelPrefix ) { string [ ] strParts = GetPrefix ( ChannelPrefix ) ; if ( strParts != null ) { if ( int . Parse ( strParts [ 1 ] ) > 0 ) { int intCurrentChannels = 0 ; foreach ( Channel c in _parent . Channels ) if ( strParts [ 0 ] . IndexOf ( c . Name [ 0 ] ) != - 1 ) intCurrentChannels ++ ; return int . Parse ( strParts [ 1 ] ) - intCurrentChannels ; } return 0 ; } return - 1 ; }
Gets the number of channels left to join with the specified channel prefix.
Gets the number of channels left to join with the specified channel prefix .
Integer. Number of channels left to join with specified channel prefix.
Integer . Number of channels left to join with specified channel prefix .
ChannelPrefix
char
None
remarks
Finds all channels already joined with specified prefix, and substract it from the total number of allowed channels on server.
Finds all channels already joined with specified prefix and substract it from the total number of allowed channels on server .