mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-01 16:16:46 +02:00
simplify logging
This commit is contained in:
@ -115,7 +115,7 @@ static void chat_onMessage(ToxWindow *self, Tox *m, int num, uint8_t *msg, uint1
|
||||
} else
|
||||
wprintw(ctx->history, "%s\n", msg);
|
||||
|
||||
add_to_log_buf(msg, nick, ctx->log, false);
|
||||
write_to_log(msg, nick, ctx->log, false);
|
||||
alert_window(self, WINDOW_ALERT_1, true);
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ static void chat_onAction(ToxWindow *self, Tox *m, int num, uint8_t *action, uin
|
||||
wprintw(ctx->history, "* %s %s\n", nick, action);
|
||||
wattroff(ctx->history, COLOR_PAIR(YELLOW));
|
||||
|
||||
add_to_log_buf(action, nick, ctx->log, true);
|
||||
write_to_log(action, nick, ctx->log, true);
|
||||
alert_window(self, WINDOW_ALERT_1, true);
|
||||
}
|
||||
|
||||
@ -341,7 +341,7 @@ static void send_action(ToxWindow *self, ChatContext *ctx, Tox *m, uint8_t *acti
|
||||
wprintw(ctx->history, " * Failed to send action\n");
|
||||
wattroff(ctx->history, COLOR_PAIR(RED));
|
||||
} else {
|
||||
add_to_log_buf(action, selfname, ctx->log, true);
|
||||
write_to_log(action, selfname, ctx->log, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -532,7 +532,7 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
||||
wprintw(ctx->history, " * Failed to send message.\n");
|
||||
wattroff(ctx->history, COLOR_PAIR(RED));
|
||||
} else {
|
||||
add_to_log_buf(line, selfname, ctx->log, false);
|
||||
write_to_log(line, selfname, ctx->log, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user