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 */