mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Added /me handling in logs
This commit is contained in:
parent
e4c389cc51
commit
6318cd91ba
@ -80,9 +80,17 @@ chat_log_chat(const gchar * const login, gchar *other,
|
|||||||
FILE *logp = fopen(dated_log->filename, "a");
|
FILE *logp = fopen(dated_log->filename, "a");
|
||||||
|
|
||||||
if (direction == IN) {
|
if (direction == IN) {
|
||||||
fprintf(logp, "%s - %s: %s\n", date_fmt, other_copy, msg);
|
if (strncmp(msg, "/me ", 4) == 0) {
|
||||||
|
fprintf(logp, "%s - *%s %s\n", date_fmt, other_copy, msg + 4);
|
||||||
|
} else {
|
||||||
|
fprintf(logp, "%s - %s: %s\n", date_fmt, other_copy, msg);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
fprintf(logp, "%s - me: %s\n", date_fmt, msg);
|
if (strncmp(msg, "/me ", 4) == 0) {
|
||||||
|
fprintf(logp, "%s - *me %s\n", date_fmt, msg + 4);
|
||||||
|
} else {
|
||||||
|
fprintf(logp, "%s - me: %s\n", date_fmt, msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fflush(logp);
|
fflush(logp);
|
||||||
int result = fclose(logp);
|
int result = fclose(logp);
|
||||||
|
@ -440,8 +440,16 @@ win_show_outgoing_msg(const char * const from, const char * const to,
|
|||||||
}
|
}
|
||||||
|
|
||||||
_win_show_time(win);
|
_win_show_time(win);
|
||||||
_win_show_user(win, from, 0);
|
if (strncmp(message, "/me ", 4) == 0) {
|
||||||
_win_show_message(win, message);
|
wattron(win, COLOUR_ONLINE);
|
||||||
|
wprintw(win, "*%s ", from);
|
||||||
|
wprintw(win, message + 4);
|
||||||
|
wprintw(win, "\n");
|
||||||
|
wattroff(win, COLOUR_ONLINE);
|
||||||
|
} else {
|
||||||
|
_win_show_user(win, from, 1);
|
||||||
|
_win_show_message(win, message);
|
||||||
|
}
|
||||||
_win_switch_if_active(win_index);
|
_win_switch_if_active(win_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user