From 62b15f204f2100f11a6f39b1d4b3022b00a44a13 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 7 Jun 2006 01:29:17 +0000 Subject: [PATCH] Support for /me in multiplayer text chat git-svn-id: https://svn.eduke32.com/eduke32@187 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 22 ++++++++++++++++++++-- polymer/eduke32/source/wrapper.c | 2 +- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 32bccd616..b5b84919e 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -2367,8 +2367,26 @@ void typemode(void) if(ud.multimode < 3) sendmessagecommand = 2; - strcat(recbuf,ud.user_name[myconnectindex]); - strcat(recbuf,":^0 "); + 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]); + } + else + { + strcat(recbuf,ud.user_name[myconnectindex]); + strcat(recbuf,": "); + } + + strcat(recbuf,"^0"); strcat(recbuf,typebuf); j = strlen(recbuf); recbuf[j] = 0; diff --git a/polymer/eduke32/source/wrapper.c b/polymer/eduke32/source/wrapper.c index 56b952da5..910b2f28d 100755 --- a/polymer/eduke32/source/wrapper.c +++ b/polymer/eduke32/source/wrapper.c @@ -39,7 +39,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, in i++; CmdLine[i] = '\0'; } - + if(szFileName[0] != '\0' && CmdLine[0] != '\0') sprintf(sCmdLine,"eduke32.exe %s -rmnet %s",CmdLine,szFileName); else if(CmdLine[0] != '\0') sprintf(sCmdLine,"eduke32.exe %s",CmdLine); else sprintf(sCmdLine,"eduke32.exe");