diff options
author | Diogo Sousa <diogogsousa@gmail.com> | 2013-07-10 00:42:34 +0100 |
---|---|---|
committer | Diogo Sousa <diogogsousa@gmail.com> | 2013-07-10 00:42:34 +0100 |
commit | 5e240eb259c473dd5ef25a5d11ef5ad574470f3a (patch) | |
tree | bfe0c309fc051ef79f3933e87e7a8da35c992ec4 /src/common/text.c | |
parent | 7101b7b864df280059750c0de4d6b9d41e907122 (diff) |
Indentation fixes and code cleanup.
Diffstat (limited to 'src/common/text.c')
-rw-r--r-- | src/common/text.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/text.c b/src/common/text.c index f251283b..94744e86 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -2070,6 +2070,8 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d, int i; unsigned int stripcolor_args = (chanopt_is_set (prefs.hex_text_stripcolor_msg, sess->text_strip) ? 0xFFFFFFFF : 0); char tbuf[NICKLEN + 4]; + int eat1; + int eat2; if (prefs.hex_text_color_nicks && (index == XP_TE_CHANACTION || index == XP_TE_CHANMSG)) { @@ -2086,9 +2088,11 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d, for (i = 5; i < PDIWORDS; i++) word[i] = "\000"; + eat1 = plugin_emit_print (sess, word); + eat2 = plugin_emit_print_attrs (sess, word, timestamp); + /* don't use || here, since it might short-circuit */ - if (plugin_emit_print (sess, word) - + plugin_emit_print_attrs (sess, word, timestamp)) + if (eat1 || eat2) return; /* If a plugin's callback executes "/close", 'sess' may be invalid */ |