aboutsummaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-09-24 02:03:10 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-09-24 15:41:39 +0200
commit11aaf1b325be353f7ac9e5ebbf4d9c6ed2cf722e (patch)
tree8dcdc4674ee2e01ecaf72d08c830c12d2182569e /degesch.c
parent5ca07656a12d267963263e8ea5e958140200e62e (diff)
downloadxK-11aaf1b325be353f7ac9e5ebbf4d9c6ed2cf722e.tar.gz
xK-11aaf1b325be353f7ac9e5ebbf4d9c6ed2cf722e.tar.xz
xK-11aaf1b325be353f7ac9e5ebbf4d9c6ed2cf722e.zip
degesch: fix logging of outgoing status messages
"/msg @#test test" would log "MSG(): test"
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/degesch.c b/degesch.c
index 1c8427c..0500fa2 100644
--- a/degesch.c
+++ b/degesch.c
@@ -2523,6 +2523,16 @@ formatter_parse_mirc (struct formatter *self, const char *s)
static void
formatter_parse_nick (struct formatter *self, char *s)
{
+ // For outgoing messages; maybe we should add a special #t for them
+ // which would also make us not cut off the userhost part, ever
+ if (irc_is_channel (self->s, irc_skip_statusmsg (self->s, s)))
+ {
+ char *tmp = irc_to_utf8 (self->ctx, s);
+ FORMATTER_ADD_TEXT (self, tmp);
+ free (tmp);
+ return;
+ }
+
char *nick = irc_cut_nickname (s);
int color = siphash_wrapper (nick, strlen (nick)) % 7;