mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-04 06:16:45 +02:00
Display a user warning when log fails to initialize
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user