All pastes #17810 Raw Edit

Something

public text v1 · immutable
#17810 ·published 2005-07-15 22:31 UTC
rendered paste body
            if (info.msg().Length > nick.Length + 10)
            {
                string searchString = info.msg().Substring(nick.Length + 10);
                site = definedGoogleSite;
                if (site == null && results == 0 && definedGoogleTrigger == null)
                    r = s.doGoogleSearch(googleKey, searchString, 0, 3, false, "", true, "", "", "");

                else if (site != null && results != 0)
                    r = s.doGoogleSearch(googleKey, searchString + " site:" + site, 0, results, false, "", true, "", "", "");

                else if (site != null && results == 0)
                    r = s.doGoogleSearch(googleKey, searchString + " site:" + site, 0, 3, false, "", true, "", "", "");

                for (int i = 0; i < r.resultElements.Length; i++)
                {
                    if (i == 0)
                    {
                        CA.sayn(r.resultElements[i].URL + " ");

                        if (r.resultElements.Length == 1)
                            CA.contSay("\n");

                        continue;
                    }
                    CA.contSay(r.resultElements[i].URL + " ");

                    if (i == (r.resultElements.Length - 1))
                        CA.contSay("\n");

                }

            }
        }