mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Merge branch 'master' into chatstates
This commit is contained in:
commit
9f266ac000
@ -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);
|
||||||
|
@ -442,6 +442,8 @@ cmd_init(void)
|
|||||||
p_autocomplete_add(who_ac, (gchar *)strdup(pcmd->cmd+1));
|
p_autocomplete_add(who_ac, (gchar *)strdup(pcmd->cmd+1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p_autocomplete_add(who_ac, "offline");
|
||||||
|
|
||||||
history_init();
|
history_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,8 +275,17 @@ win_show_incomming_msg(const char * const from, const char * const message)
|
|||||||
// currently viewing chat window with sender
|
// currently viewing chat window with sender
|
||||||
if (win_index == _curr_prof_win) {
|
if (win_index == _curr_prof_win) {
|
||||||
_win_show_time(win);
|
_win_show_time(win);
|
||||||
_win_show_user(win, short_from, 1);
|
|
||||||
_win_show_message(win, message);
|
if (strncmp(message, "/me ", 4) == 0) {
|
||||||
|
wattron(win, COLOUR_ONLINE);
|
||||||
|
wprintw(win, "*%s ", short_from);
|
||||||
|
wprintw(win, message + 4);
|
||||||
|
wprintw(win, "\n");
|
||||||
|
wattroff(win, COLOUR_ONLINE);
|
||||||
|
} else {
|
||||||
|
_win_show_user(win, short_from, 1);
|
||||||
|
_win_show_message(win, message);
|
||||||
|
}
|
||||||
title_bar_set_typing(FALSE);
|
title_bar_set_typing(FALSE);
|
||||||
title_bar_draw();
|
title_bar_draw();
|
||||||
status_bar_active(win_index);
|
status_bar_active(win_index);
|
||||||
@ -295,8 +304,16 @@ win_show_incomming_msg(const char * const from, const char * const message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_win_show_time(win);
|
_win_show_time(win);
|
||||||
_win_show_user(win, short_from, 1);
|
if (strncmp(message, "/me ", 4) == 0) {
|
||||||
_win_show_message(win, message);
|
wattron(win, COLOUR_ONLINE);
|
||||||
|
wprintw(win, "*%s ", short_from);
|
||||||
|
wprintw(win, message + 4);
|
||||||
|
wprintw(win, "\n");
|
||||||
|
wattroff(win, COLOUR_ONLINE);
|
||||||
|
} else {
|
||||||
|
_win_show_user(win, short_from, 1);
|
||||||
|
_win_show_message(win, message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prefs_get_beep())
|
if (prefs_get_beep())
|
||||||
@ -423,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…
x
Reference in New Issue
Block a user