diff options
Diffstat (limited to 'src/chat_log.c')
-rw-r--r-- | src/chat_log.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/chat_log.c b/src/chat_log.c index 2e53dfc7..5ea40911 100644 --- a/src/chat_log.c +++ b/src/chat_log.c @@ -80,9 +80,17 @@ chat_log_chat(const gchar * const login, gchar *other, FILE *logp = fopen(dated_log->filename, "a"); 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 { - 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); int result = fclose(logp); |