command hell I need help ! PLZZZZZZZZZZ :) - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

command hell I need help ! PLZZZZZZZZZZ :)

[b][red]This message was edited by Moderator at 2004-9-23 1:49:5[/red][/b][hr]
I like to add commands to my lan chat client and server I have it so when a user clicks on a button the client sends the command to server and then the server replys with the option

here is button code

[code]
procedure TForm1.XiButton2Click(Sender: TObject);
begin
ClientSocket1.Socket.SendText('userlist'+ CrLf);
end;
[/code]

and this is the server code to the command

[code]
if Command = 'userlist' then
begin
ServerSocket1.Socket.Connections[0].SendText('userlist'+ CrLf);
end;
[/code]

the server will then reply to client telling it wot option to enable here is code below!

[code]
if Command = 'userlist' then // userlist
begin
Showmessage('This is working COOL!!;
end;
[/code]

anyone got idears?

Slewis


Comments

  • softmansoftman Posts: 157Member
    Hi!

    I Think I need a bit more info!

    SoftMan

    : [b][red]This message was edited by Moderator at 2004-9-23 1:49:5[/red][/b][hr]
    : I like to add commands to my lan chat client and server I have it so when a user clicks on a button the client sends the command to server and then the server replys with the option
    :
    : here is button code
    :
    : [code]
    : procedure TForm1.XiButton2Click(Sender: TObject);
    : begin
    : ClientSocket1.Socket.SendText('userlist'+ CrLf);
    : end;
    : [/code]
    :
    : and this is the server code to the command
    :
    : [code]
    : if Command = 'userlist' then
    : begin
    : ServerSocket1.Socket.Connections[0].SendText('userlist'+ CrLf);
    : end;
    : [/code]
    :
    : the server will then reply to client telling it wot option to enable here is code below!
    :
    : [code]
    : if Command = 'userlist' then // userlist
    : begin
    : Showmessage('This is working COOL!!;
    : end;
    : [/code]
    :
    : anyone got idears?
    :
    : Slewis
    :
    :
    :

Sign In or Register to comment.