channel rather than a channel *. This allows inviting to empty channels.
Updated all users of this function accordingly (chanserv, helpmod2, lua).
continue;
}
- localinvite(chanservnick, rcup->chan->index->channel, sender);
+ localinvite(chanservnick, rcup->chan->index, sender);
}
chanservstdmessage(sender, QM_DONE);
return CMD_ERROR;
if (cip->channel) {
- localinvite(chanservnick, cip->channel, sender);
+ localinvite(chanservnick, cip, sender);
}
chanservstdmessage(sender, QM_DONE);
} else {
/* Channel exists but user is not joined: invite if they are +j-b */
if (CUIsAutoInvite(rcup) && CUKnown(rcup) && !CUIsBanned(rcup)) {
- localinvite(chanservnick, rcup->chan->index->channel, np);
+ localinvite(chanservnick, rcup->chan->index, np);
}
}
}
if (hchan->flags & H_PASSIVE)
return;
- localinvite(helpmodnick, hchan->real_channel, husr->real_user);
+ localinvite(helpmodnick, hchan->real_channel->index, husr->real_user);
}
static void hmode_set_channel(hchannel *hchan)
}
}
-void localinvite(nick *source, channel *cp, nick *target) {
+void localinvite(nick *source, chanindex *cip, nick *target) {
/* Servers can't send invites */
if (!source)
* argument */
if (connected) {
irc_send("%s I %s :%s",longtonumeric(source->numeric,5),
- target->nick, cp->index->name->content);
+ target->nick, cip->name->content);
}
}
void localusermodechange(nick *np, channel *cp, char *modes);
void sendmessagetochannel(nick *source, channel *cp, char *format, ... ) __attribute__ ((format (printf, 3, 4)));
void sendopnoticetochannel(nick *source, channel *cp, char *format, ... ) __attribute__ ((format (printf, 3, 4)));
-void localinvite(nick *source, channel *cp, nick *target);
+void localinvite(nick *source, chanindex *cip, nick *target);
void localsetmodeinit (modechanges *changes, channel *cp, nick *np);
void localdosetmode_nick (modechanges *changes, nick *target, short modes);
if(!cp)
LUA_RETURN(ps, LUA_FAIL);
- localinvite(lua_nick, cp, np);
+ localinvite(lua_nick, cp->index, np);
LUA_RETURN(ps, LUA_OK);
}