Пример #1
0
    void ShowAll(string channel, string nick, int?assocPat)
    {
        string[] patterns;
        if (assocPat == null)
        {
            irc.SendNotice(nick, "Patterns for {0}:", channel);
            patterns = feedPatterns.GetPatterns(channel);
        }
        else if (assocPat >= 0)
        {
            string pattern = feedPatterns.Get(channel, assocPat.Value);
            if (pattern != null)
            {
                irc.SendNotice(nick, "Exclude patterns associated with \"{0}\":", pattern);
            }

            patterns = feedPatterns.GetExcludePatterns(channel, assocPat.Value);
        }
        else
        {
            irc.SendNotice(nick, "Global exclude patterns for {0}:", channel);
            patterns = feedPatterns.GetGlobalExcludePatterns(channel);
        }

        IrcShow(nick, patterns);
    }