Fix various bugs with the chat.

This commit is contained in:
Steel Titanium 2018-12-21 22:28:28 -05:00
parent e42bcd5b68
commit 10521d161c
2 changed files with 3 additions and 5 deletions

View file

@ -2762,7 +2762,7 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
msg = KICK_MSG_CON_FAIL; msg = KICK_MSG_CON_FAIL;
} }
CONS_Printf("\x82%s ", player_names[pnum]); //CONS_Printf("\x82%s ", player_names[pnum]);
// If a verified admin banned someone, the server needs to know about it. // If a verified admin banned someone, the server needs to know about it.
// If the playernum isn't zero (the server) then the server needs to record the ban. // If the playernum isn't zero (the server) then the server needs to record the ban.
@ -3119,9 +3119,6 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
if (newplayernum+1 > doomcom->numslots) if (newplayernum+1 > doomcom->numslots)
doomcom->numslots = (INT16)(newplayernum+1); doomcom->numslots = (INT16)(newplayernum+1);
if (netgame)
CONS_Printf(M_GetText("Player %d has joined the game (node %d)\n"), newplayernum+1, node);
// the server is creating my player // the server is creating my player
if (node == mynode) if (node == mynode)
{ {

View file

@ -941,7 +941,7 @@ static void HU_queueChatChar(char c)
{ {
INT32 spc = 1; // used if nodenum[1] is a space. INT32 spc = 1; // used if nodenum[1] is a space.
char *nodenum = (char*) malloc(3); char *nodenum = (char*) malloc(3);
const char *newmsg = msg+5+spc; const char *newmsg;
// what we're gonna do now is check if the node exists // what we're gonna do now is check if the node exists
// with that logic, characters 4 and 5 are our numbers: // with that logic, characters 4 and 5 are our numbers:
@ -990,6 +990,7 @@ static void HU_queueChatChar(char c)
} }
// we need to get rid of the /pm<node> // we need to get rid of the /pm<node>
newmsg = msg+5+spc;
memcpy(msg, newmsg, 255); memcpy(msg, newmsg, 255);
} }
if (ci > 3) // don't send target+flags+empty message. if (ci > 3) // don't send target+flags+empty message.