1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-27 19:26:45 +02:00

filter escape sequences from all inbound nicks and status messages

This commit is contained in:
Jfreegman
2014-10-07 16:18:06 -04:00
parent 1f2bd44dce
commit 9f0daca5eb
6 changed files with 17 additions and 9 deletions

View File

@ -112,7 +112,7 @@ void on_nickchange(Tox *m, int32_t friendnumber, const uint8_t *string, uint16_t
{
char nick[TOXIC_MAX_NAME_LENGTH + 1];
length = copy_tox_str(nick, sizeof(nick), (const char *) string, length);
escape_newline_str(nick, length);
filter_str(nick, length);
int i;
@ -128,7 +128,7 @@ void on_statusmessagechange(Tox *m, int32_t friendnumber, const uint8_t *string,
{
char msg[TOX_MAX_STATUSMESSAGE_LENGTH + 1];
length = copy_tox_str(msg, sizeof(msg), (const char *) string, length);
escape_newline_str(msg, length);
filter_str(msg, length);
int i;