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

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


  • 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:

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

    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.

  • that work good thanks mate :)

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!