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/proto-irc.c | |
parent | 62d52d55b235479a83baa3fa4749ea33e34cbea4 (diff) | |
parent | 35989660692d5550808eeec066d52043431484cc (diff) |
Merge pull request #675 from orium/server-time-plugins
Server time plugins
Diffstat (limited to 'src/common/proto-irc.c')
-rw-r--r-- | src/common/proto-irc.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index bea9f6f7..128c0c85 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -1493,6 +1493,9 @@ irc_inline (server *serv, char *buf, int len) if (buf[0] == ':') { + int eat1; + int eat2; + /* find a context for this message */ if (is_channel (serv, word[3])) { @@ -1506,15 +1509,29 @@ irc_inline (server *serv, char *buf, int len) word[0] = type; word_eol[1] = buf; /* keep the ":" for plugins */ - if (plugin_emit_server (sess, type, word, word_eol)) + + eat1 = plugin_emit_server (sess, type, word, word_eol); + eat2 = plugin_emit_server_attrs (sess, type, word, word_eol, + tags_data.timestamp); + + if (eat1 || eat2) goto xit; + word[1]++; word_eol[1] = buf + 1; /* but not for HexChat internally */ } else { + int eat1; + int eat2; + word[0] = type = word[1]; - if (plugin_emit_server (sess, type, word, word_eol)) + + eat1 = plugin_emit_server (sess, type, word, word_eol); + eat2 = plugin_emit_server_attrs (sess, type, word, word_eol, + tags_data.timestamp); + + if (eat1 || eat2) goto xit; } |