show invites of other users when provided

This commit is contained in:
ailin-nemui 2019-08-13 01:05:57 +02:00
commit e62e55c0ab
8 changed files with 47 additions and 6 deletions

View file

@ -336,11 +336,17 @@ static void event_kick(IRC_SERVER_REC *server, const char *data)
static void event_invite(IRC_SERVER_REC *server, const char *data)
{
char *params, *channel, *shortchan;
char *params, *nick, *channel, *shortchan;
g_return_if_fail(data != NULL);
params = event_get_params(data, 2, NULL, &channel);
params = event_get_params(data, 2, &nick, &channel);
if (server->nick_comp_func(nick, server->nick) != 0) {
/* someone else was invited, no need to do anything */
g_free(params);
return;
}
if (irc_channel_find(server, channel) == NULL) {
/* check if we're supposed to autojoin this channel */

View file

@ -236,6 +236,7 @@ static void server_init(IRC_SERVER_REC *server)
irc_cap_toggle(server, CAP_MULTI_PREFIX, TRUE);
irc_cap_toggle(server, CAP_EXTENDED_JOIN, TRUE);
irc_cap_toggle(server, CAP_SETNAME, TRUE);
irc_cap_toggle(server, CAP_INVITE_NOTIFY, TRUE);
irc_send_cmd_now(server, "CAP LS " CAP_LS_VERSION);

View file

@ -19,6 +19,7 @@
#define CAP_MULTI_PREFIX "multi-prefix"
#define CAP_EXTENDED_JOIN "extended-join"
#define CAP_SETNAME "draft/setname"
#define CAP_INVITE_NOTIFY "invite-notify"
/* returns IRC_SERVER_REC if it's IRC server, NULL if it isn't */
#define IRC_SERVER(server) \