Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Oct : Re: OnBeforeCommandHandler - Indy v9
| Subject: | Re: OnBeforeCommandHandler - Indy v9 |
| Posted by: | "Jamie Dale" (jamie.da..@yahoo.com) |
| Date: | Sun, 28 Oct 2007 23:20:56 |
Just to add more to this, the CommandHandlers ParseParams ability doesn't
seem to work.
In the events triggered by the commandhandler there is no way of accessing
the params that are supposed to be parsed (not that they are)
Help!
Thx
"Jamie Dale" <jamie.dale@yahoo.com> wrote in message
news:472512ed@newsgroups.borland.com...
> Hi
>
> I need to send an entire command with parameters in one WriteLn.
>
> Basically something like WriteLn(<command><rest of text/parameters>);
>
> Like this: WriteLn('adduser Joe');
>
> Now, here is my problem. I can send a command and the commandhandler
> appears to accept the command by itself.
>
> What about parameters?
>
> My initial thought was to use OnBeforeCommandHandler, to strip the params
> OR extract the command. The only snag is this:
> procedure TForm1.IdTCPServer1BeforeCommandHandler(ASender: TIdTCPServer;
> const AData: String; AThread: TIdPeerThread);
>
> As you can see, the command/data is a constant and thus I can't change it
> to pass it back for the commandhandler!
>
> Any ideas please?