1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-04 06:26:44 +02:00

Display a user warning when log fails to initialize

This commit is contained in:
Jfreegman
2015-08-19 00:42:28 -04:00
committed by cnhenry
parent c546df3917
commit 19cfe3d393
6 changed files with 29 additions and 13 deletions

View File

@ -729,7 +729,9 @@ static void groupchat_onInit(ToxWindow *self, Tox *m)
if (user_settings->autolog == AUTOLOG_ON) {
char myid[TOX_ADDRESS_SIZE];
tox_self_get_address(m, (uint8_t *) myid);
log_enable(self->name, myid, NULL, ctx->log, LOG_GROUP);
if (log_enable(self->name, myid, NULL, ctx->log, LOG_GROUP) == -1)
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Warning: Log failed to initialize.");
}
execute(ctx->history, self, m, "/log", GLOBAL_COMMAND_MODE);