🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #5403

Re: TIdIRC's OnNames

#5403
From: Remy Lebeau (TeamB)
Date: Fri, 03 Sep 2004 02:29
38 lines
2003 bytes
<Tog> wrote in message news:4137b6d9$1@newsgroups.borland.com...

>                 for (int j=0; j < AUsers->Count; j++)
>                         {
>                         if (AChannel->Names->Objects[j] == (TObject*) 1)

You are looping through AUsers but then are accessing AChannel->Names
instead.  Try this instead:

    TTeListBox *myListBox = FindListBox(AChannel->Name);
    if( myListBox )
    {
        myListBox->Clear();
        for(int j = 0; j < AChannel->Names->Count; ++j)
        {
            switch( (int) AChannel->Names->Objects[j] )
            {
                case 1:
                    myListBox->Items->Add("@" +
AChannel->Names->Strings[j]);
                    break;
                case 2:
                    myListBox->Items->Add("+" +
AChannel->Names->Strings[j]);
                    break;
                case 3:
                    myListBox->Items->Add("@" + AChannel->Names->Strings[j]
+ "+");
                    break;
                default:
                    myListBox->Items->Add(AChannel->Names->Strings[j]);
                    break;
            }
        }


Gambit
Technical Details
Message-ID: <4137d6b6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4137b6d9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f843ea76483f5354
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <4137b6d9$1@newsgroups.borland.com>
Subject: Re: TIdIRC's OnNames
Date: Thu, 2 Sep 2004 19:29:38 -0700
Lines: 40
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <4137d6b6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1094178486 68.69.17.41 (2 Sep 2004 19:28:06 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail