slash command on a chat

I been trying to add a /me funcation on my chat however when I try to add the code it dont work

Id like to make it so when a person types /me and there txt it will show!

but when I type in /me ssss it only shows that has next with the /me with it allso! can anyone help cheers

[code]
if (copy(txtSend.Text,1,10)) = ('/me '+txtSend.Text) then
begin
SendData('WSH',loginname +' '+ txtSend.Text);
[/code]
Slewis

Comments

  • I'm not sure what you are getting at here but i think you want to "kind of" replace "/me" with a real nick.

    I would propably do like this:

    [code]
    if UpperCase(copy(txtSend.Text,1,3)) = '/ME' then
    begin
    SendData('WSH',loginname + Copy(txtSend.Text,4,Length(txtSend.Text));
    end;
    [/code]

    I dont know if the function UpperCase exists in Delphi versions below 7 but if you can use it the If statement will work for /Me , /mE and /ME as well.

    //Ulvert
  • that work good thanks mate :)
    Slewis

Sign In or Register to comment.

Howdy, Stranger!

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

Categories