static struct dict *unbursted_channels;
static const char *his_servername;
static const char *his_servercomment;
+static struct channelList dead_channels;
/* These correspond to 1 << X: 012345678901234567 */
-const char irc_user_mode_chars[] = "o iw dkgn I";
+const char irc_user_mode_chars[] = "o iw dkgn x I";
static struct userNode *AddUser(struct server* uplink, const char *nick, const char *ident, const char *hostname, const char *modes, const char *numeric, const char *userinfo, unsigned long timestamp, const char *realip);
log_module(MAIN_LOG, LOG_ERROR, "Unable to find user %s whose mode is changing.", argv[1]);
return 0;
}
+ argv[2] = unsplit_string(argv + 2, argc - 2, NULL);
mod_usermode(un, argv[2]);
return 1;
}
memset(notice_funcs, 0, sizeof(privmsg_func_t)*num_notice_funcs);
userList_init(&dead_users);
+ channelList_init(&dead_channels);
reg_del_channel_func(remove_unbursted_channel);
reg_exit_func(parse_cleanup);
}
for (i=0; i<dead_users.used; i++)
free_user(dead_users.list[i]);
dead_users.used = 0;
+ for (i=0; i<dead_channels.used; i++)
+ UnlockChannel(dead_channels.list[i]);
+ dead_channels.used = 0;
}
return res;
}
char mask[MAXLEN];
char *host, *ident;
unsigned int ii;
+
for (ii=0; (*word != ' ') && (*word != '\0'); )
mask[ii++] = *word++;
mask[ii] = 0;
ident = NULL;
host = mask;
}
+ user->modes |= FLAGS_HIDDEN_HOST;
assign_fakehost(user, host, ident, 0, 0);
}
break;
}
break;
case 'U':
+ if (flags & MCP_NO_APASS)
+ goto error;
if (add)
{
if ((in_arg >= argc)
}
break;
case 'A':
+ if (flags & MCP_NO_APASS)
+ goto error;
if (add) {
if ((in_arg >= argc)
|| keyncpy(change->new_apass, modes[in_arg++], sizeof(change->new_apass)))
change->modes_set &= ~(MODE_SECRET);
change->modes_clear |= MODE_SECRET;
}
+ if (change->modes_clear & MODE_REGISTERED) {
+ /* Horribly cheat by using the lock/unlock semantics. */
+ LockChannel(channel);
+ channelList_append(&dead_channels, channel);
+ }
return change;
error:
mod_chanmode_free(change);
if (numeric >= num_notice_funcs) {
int newnum = numeric + 8, ii;
notice_funcs = realloc(notice_funcs, newnum*sizeof(privmsg_func_t));
- for (ii = num_privmsg_funcs; ii < newnum; ++ii)
- privmsg_funcs[ii] = NULL;
+ for (ii = num_notice_funcs; ii < newnum; ++ii)
+ notice_funcs[ii] = NULL;
num_notice_funcs = newnum;
}
if (notice_funcs[numeric])