diff options
author | Diogo Sousa <diogogsousa@gmail.com> | 2013-07-14 11:29:24 -0700 |
---|---|---|
committer | Diogo Sousa <diogogsousa@gmail.com> | 2013-07-14 11:29:24 -0700 |
commit | 6c8d9c2194d220ba26b8be09e8a6bffa4cf99b7f (patch) | |
tree | 67421013c2f1fcdbeeb4db8142606cbf35c957ff /src/common/text.c | |
parent | 62d52d55b235479a83baa3fa4749ea33e34cbea4 (diff) | |
parent | 35989660692d5550808eeec066d52043431484cc (diff) |
Merge pull request #675 from orium/server-time-plugins
Server time plugins
Diffstat (limited to 'src/common/text.c')
-rw-r--r-- | src/common/text.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/common/text.c b/src/common/text.c index a0e860ce..b825faba 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,7 +2088,10 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d, for (i = 5; i < PDIWORDS; i++) word[i] = "\000"; - if (plugin_emit_print (sess, word)) + eat1 = plugin_emit_print (sess, word); + eat2 = plugin_emit_print_attrs (sess, word, timestamp); + + if (eat1 || eat2) return; /* If a plugin's callback executes "/close", 'sess' may be invalid */ @@ -2158,14 +2163,15 @@ text_find_format_string (char *name) } int -text_emit_by_name (char *name, session *sess, char *a, char *b, char *c, char *d) +text_emit_by_name (char *name, session *sess, time_t timestamp, + char *a, char *b, char *c, char *d) { int i = 0; i = pevent_find (name, &i); if (i >= 0) { - text_emit (i, sess, a, b, c, d, 0); + text_emit (i, sess, a, b, c, d, timestamp); return 1; } |