continue;
if (strchr(parv[param], 'i') || strchr(parv[param], 'k'))
{
+ /* Clear any outstanding rogue invites */
+ mode_invite_clear(chptr);
for (member = chptr->members; member; member = nmember)
{
nmember = member->next_member;
if (!MyUser(member->user) || IsZombie(member))
continue;
sendcmdto_serv_butone(&me, CMD_KICK, NULL, "%H %C :Net Rider", chptr, member->user);
- sendcmdto_channel_butserv_butone(&me, CMD_KICK, chptr, NULL, "%H %C :Net Rider", chptr, member->user);
+ sendcmdto_channel_butserv_butone(&me, CMD_KICK, chptr, NULL, 0, "%H %C :Net Rider", chptr, member->user);
make_zombie(member, member->user, &me, &me, chptr);
}
}
modebuf_mode(mbuf, MODE_DEL | chptr->mode.mode); /* wipeout modes */
chptr->mode.mode &= ~(MODE_ADD | MODE_DEL | MODE_PRIVATE | MODE_SECRET |
MODE_MODERATED | MODE_TOPICLIMIT | MODE_INVITEONLY |
- MODE_NOPRIVMSGS);
+ MODE_NOPRIVMSGS | MODE_DELJOINS);
parse_flags |= (MODE_PARSE_SET | MODE_PARSE_WIPEOUT); /* wipeout keys */
/* mark bans for wipeout */
for (lp = chptr->banlist; lp; lp = lp->next)
lp->flags |= CHFL_BURST_BAN_WIPEOUT;
+
+ /* clear topic set by netrider (if set) */
+ if (*chptr->topic) {
+ *chptr->topic = '\0';
+ *chptr->topic_nick = '\0';
+ chptr->topic_time = 0;
+ sendcmdto_channel_butserv_butone(&me, CMD_TOPIC, chptr, NULL, 0,
+ "%H :%s", chptr, chptr->topic);
+ }
} else if (chptr->creationtime == timestamp) {
modebuf_init(mbuf = &modebuf, &me, cptr, chptr,
MODEBUF_DEST_CHANNEL | MODEBUF_DEST_NOKEY);
{
struct Client *acptr;
char *nicklist = parv[param], *p = 0, *nick, *ptr;
- int current_mode = CHFL_DEOPPED | CHFL_BURST_JOINED;
- int last_mode = CHFL_DEOPPED | CHFL_BURST_JOINED;
+ int current_mode, last_mode, base_mode;
int oplevel = -1; /* Mark first field with digits: means the same as 'o' (but with level). */
int last_oplevel = 0;
struct Membership* member;
+ base_mode = CHFL_DEOPPED | CHFL_BURST_JOINED;
+ if (chptr->mode.mode & MODE_DELJOINS)
+ base_mode |= CHFL_DELAYED;
+ current_mode = last_mode = base_mode;
+
for (nick = ircd_strtok(&p, nicklist, ","); nick;
nick = ircd_strtok(&p, 0, ",")) {
*/
oplevel = MAXOPLEVEL;
if (current_mode_needs_reset) {
- current_mode = CHFL_DEOPPED | CHFL_BURST_JOINED;
+ current_mode = base_mode;
current_mode_needs_reset = 0;
}
- current_mode = (current_mode & ~CHFL_DEOPPED) | CHFL_CHANOP;
+ current_mode = (current_mode & ~(CHFL_DEOPPED | CHFL_DELAYED)) | CHFL_CHANOP;
}
else if (*ptr == 'v') { /* has voice status */
if (current_mode_needs_reset) {
- current_mode = CHFL_DEOPPED | CHFL_BURST_JOINED;
+ current_mode = base_mode;
current_mode_needs_reset = 0;
}
- current_mode |= CHFL_VOICE;
+ current_mode = (current_mode & ~CHFL_DELAYED) | CHFL_VOICE;
oplevel = -1; /* subsequential digits are an absolute op-level value. */
}
else if (isdigit(*ptr)) {
int level_increment = 0;
if (oplevel == -1) { /* op-level is absolute value? */
if (current_mode_needs_reset) {
- current_mode = CHFL_DEOPPED | CHFL_BURST_JOINED;
+ current_mode = base_mode;
current_mode_needs_reset = 0;
}
oplevel = 0;
}
- current_mode = (current_mode & ~CHFL_DEOPPED) | CHFL_CHANOP;
+ current_mode = (current_mode & ~(CHFL_DEOPPED | CHFL_DELAYED)) | CHFL_CHANOP;
do {
level_increment = 10 * level_increment + *ptr++ - '0';
} while(isdigit(*ptr));
if (IsBurst(sptr) || !(member = find_member_link(chptr, acptr)))
{
add_user_to_channel(chptr, acptr, current_mode, oplevel);
- sendcmdto_channel_butserv_butone(acptr, CMD_JOIN, chptr, NULL, "%H", chptr);
+ if (!(current_mode & CHFL_DELAYED))
+ sendcmdto_channel_butserv_butone(acptr, CMD_JOIN, chptr, NULL, 0, "%H", chptr);
}
else
{