diff --git a/src/chat_log.c b/src/chat_log.c index 4d7f50b6..d8b2a6d3 100644 --- a/src/chat_log.c +++ b/src/chat_log.c @@ -87,7 +87,7 @@ chat_log_chat(const gchar * const login, gchar *other, FILE *logp = fopen(dated_log->filename, "a"); - if (direction == IN) { + if (direction == PROF_IN_LOG) { if (strncmp(msg, "/me ", 4) == 0) { fprintf(logp, "%s - *%s %s\n", date_fmt, other_copy, msg + 4); } else { diff --git a/src/chat_log.h b/src/chat_log.h index e0aac551..8ea7906d 100644 --- a/src/chat_log.h +++ b/src/chat_log.h @@ -26,8 +26,8 @@ #include typedef enum { - IN, - OUT + PROF_IN_LOG, + PROF_OUT_LOG } chat_log_direction_t; void chat_log_init(void); diff --git a/src/command.c b/src/command.c index a4e12c68..bd0ab01b 100644 --- a/src/command.c +++ b/src/command.c @@ -857,7 +857,7 @@ cmd_execute_default(const char * const inp) if (prefs_get_chlog()) { const char *jid = jabber_get_jid(); - chat_log_chat(jid, recipient, inp, OUT, NULL); + chat_log_chat(jid, recipient, inp, PROF_OUT_LOG, NULL); } win_show_outgoing_msg("me", recipient, inp); @@ -1506,7 +1506,7 @@ _cmd_msg(gchar **args, struct cmd_help_t help) if (prefs_get_chlog()) { const char *jid = jabber_get_jid(); - chat_log_chat(jid, usr, msg, OUT, NULL); + chat_log_chat(jid, usr, msg, PROF_OUT_LOG, NULL); } return TRUE; @@ -1607,7 +1607,7 @@ _cmd_tiny(gchar **args, struct cmd_help_t help) if (prefs_get_chlog()) { const char *jid = jabber_get_jid(); - chat_log_chat(jid, recipient, tiny, OUT, NULL); + chat_log_chat(jid, recipient, tiny, PROF_OUT_LOG, NULL); } win_show_outgoing_msg("me", recipient, tiny); diff --git a/src/profanity.c b/src/profanity.c index ebecd309..428bfddd 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -127,7 +127,7 @@ prof_handle_incoming_message(char *from, char *message, gboolean priv) char *short_from = strtok(from_cpy, "/"); const char *jid = jabber_get_jid(); - chat_log_chat(jid, short_from, message, IN, NULL); + chat_log_chat(jid, short_from, message, PROF_IN_LOG, NULL); } } @@ -144,7 +144,7 @@ prof_handle_delayed_message(char *from, char *message, GTimeVal tv_stamp, char *short_from = strtok(from_cpy, "/"); const char *jid = jabber_get_jid(); - chat_log_chat(jid, short_from, message, IN, &tv_stamp); + chat_log_chat(jid, short_from, message, PROF_IN_LOG, &tv_stamp); } }