diff options
author | Jilles Tjoelker <jilles@irssi.org> | 2008-02-20 20:28:07 +0000 |
---|---|---|
committer | jilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-02-20 20:28:07 +0000 |
commit | 4e2fcc71ae8c699c07af760dff73d29e0aaf89ce (patch) | |
tree | 7fd90ec442423eaf4ff8d1ffd2b4ffd45d4a64f9 /src/fe-common/irc/fe-events-numeric.c | |
parent | 0eb386ecd88140863c6377ef18764844103b68d9 (diff) | |
download | irssi-4e2fcc71ae8c699c07af760dff73d29e0aaf89ce.zip |
Show setter/time in +I lists, if sent by the server.
Code mostly copied from +e.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4716 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-events-numeric.c')
-rw-r--r-- | src/fe-common/irc/fe-events-numeric.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c index 40d05a75..0510c4ff 100644 --- a/src/fe-common/irc/fe-events-numeric.c +++ b/src/fe-common/irc/fe-events-numeric.c @@ -210,14 +210,20 @@ static void event_accept_list(IRC_SERVER_REC *server, const char *data) static void event_invite_list(IRC_SERVER_REC *server, const char *data) { const char *channel; - char *params, *invite; + char *params, *invite, *setby, *tims; + long secs; g_return_if_fail(data != NULL); - params = event_get_params(data, 3, NULL, &channel, &invite); + params = event_get_params(data, 5, NULL, &channel, &invite, + &setby, &tims); + secs = *tims == '\0' ? 0 : + (long) (time(NULL) - atol(tims)); + channel = get_visible_target(server, channel); printformat(server, channel, MSGLEVEL_CRAP, - IRCTXT_INVITELIST, channel, invite); + *setby == '\0' ? IRCTXT_INVITELIST : IRCTXT_INVITELIST_LONG, + channel, invite, setby, secs); g_free(params); } |