Support for /me in multiplayer text chat

git-svn-id: https://svn.eduke32.com/eduke32@187 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-06-07 01:29:17 +00:00
parent 8f73605b8d
commit 62b15f204f
2 changed files with 21 additions and 3 deletions

View file

@ -2367,8 +2367,26 @@ void typemode(void)
if(ud.multimode < 3)
sendmessagecommand = 2;
if(typebuf[0] == '/' && Btoupper(typebuf[1]) == 'M' && Btoupper(typebuf[2]) == 'E')
{
strcat(recbuf,"* ");
i = 3, j = Bstrlen(typebuf);
Bstrcpy(tempbuf,typebuf);
while(i < j)
{
typebuf[i-3] = tempbuf[i];
i++;
}
typebuf[i-3] = '\0';
strcat(recbuf,ud.user_name[myconnectindex]);
strcat(recbuf,":^0 ");
}
else
{
strcat(recbuf,ud.user_name[myconnectindex]);
strcat(recbuf,": ");
}
strcat(recbuf,"^0");
strcat(recbuf,typebuf);
j = strlen(recbuf);
recbuf[j] = 0;