🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TIdIRC Access Violation

#5435
From: Tog
Date: Wed, 08 Sep 2004 23:20
32 lines
1809 bytes
Hello,

hopefully someone else may be able to figure this out, because i'm abit
lost.

void __fastcall TForm1::ircOp(TObject *Sender, TIdIRCUser *AUser,
      TIdIRCChannel *AChannel, TIdIRCUser *ATarget)
{
}


Ok, the problem here is accessing ATarget->Nick.

If I join a channel, and some OP leaves, then rejoins, and ChanServ sets +o
on that person, everything is fine.
If I join a channel first, and some OP that hasn't been there joins, and
ChanServ sets +o on that person, ATarget->Nick has no value!!??
If someone randomly OP's someone in the channel, everything is fine.

So in that ONE case where the person hasn't been in the channel before, and
chanserv op's him, I get an access violation.

From the debug I get this trying to read the nick value:

'E2208 Cannot access an inactive scope'
or
'??????'

Am I doing something wrong? I just don't see why ATarget->Nick wouldn't have
a value in the case where it gets an AV other than a Indy bug.

Thanks for reading.
Technical Details
Message-ID: <413f93a5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,d6069b12da25a878,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: <Tog>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: TIdIRC Access Violation
Date: Thu, 9 Sep 2004 01:20:06 +0200
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 83.109.19.110
Message-ID: <413f93a5$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1094685605 83.109.19.110 (8 Sep 2004 16:20:05 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail