+ } else if (!g_strcasecmp(key, "NETWORK")) {
+ g_free(info->name);
+ info->name = g_strdup(val);
+ } else if (!g_strcasecmp(key, "NICKLEN") || !g_strcasecmp(key, "MAXNICKLEN")) {
+ info->nicklen = atoi(val);
+ } else if (!g_strcasecmp(key, "USERLEN")) {
+ info->userlen = atoi(val);
+ } else if (!g_strcasecmp(key, "HOSTLEN")) {
+ info->hostlen = atoi(val);
+ } else if (!g_strcasecmp(key, "OVERRIDE")) {
+ info->operoverride = TRUE;
+ } else if (!g_strcasecmp(key, "CHANNELLEN") || !g_strcasecmp(key, "MAXCHANNELLEN")) {
+ info->channellen = atoi(val);
+ } else if (!g_strcasecmp(key, "AWAYLEN")) {
+ info->awaylen = atoi(val);
+ } else if (!g_strcasecmp(key, "KICKLEN")) {
+ info->kicklen = atoi(val);
+ } else if (!g_strcasecmp(key, "TOPICLEN")) {
+ info->topiclen = atoi(val);
+ } else if (!g_strcasecmp(key, "WATCH")) {
+ info->watch = atoi(val);
+ } else if (!g_strcasecmp(key, "MAXPARA")) {
+ info->maxpara = atoi(val);
+ } else if (!g_strcasecmp(key, "MAXCHANNELS")) {
+ info->maxchannels = atoi(val);
+ } else if (!g_strcasecmp(key, "MAXTARGETS")) {
+ info->maxtargets = atoi(val);
+ } else if (!g_strcasecmp(key, "REMOVE")) {
+ info->remove = TRUE;
+ } else if (!g_strcasecmp(key, "MAXBANS")) {
+ info->maxbans = atoi(val);
+ } else if (!g_strcasecmp(key, "MODES")) {
+ info->maxmodes = atoi(val);
+ } else if (!g_strcasecmp(key, "WALLCHOPS")) {
+ info->wallchops = TRUE;
+ } else if (!g_strcasecmp(key, "MAP")) {
+ info->map = TRUE;
+ } else if (!g_strcasecmp(key, "WALLVOICES")) {
+ info->wallvoices = TRUE;
+ } else if (!g_strcasecmp(key, "RFC2812")) {
+ info->rfc2812 = TRUE;
+ } else if (!g_strcasecmp(key, "PENALTY")) {
+ info->penalty = TRUE;
+ } else if (!g_strcasecmp(key, "FNC")) {
+ info->forced_nick_changes = TRUE;
+ } else if (!g_strcasecmp(key, "SAFELIST")) {
+ info->safelist = TRUE;
+ } else if (!g_strcasecmp(key, "USERIP")) {
+ info->userip = TRUE;
+ } else if (!g_strcasecmp(key, "CPRIVMSG")) {
+ info->cprivmsg = TRUE;
+ } else if (!g_strcasecmp(key, "CNOTICE")) {
+ info->cnotice = TRUE;
+ } else if (!g_strcasecmp(key, "KNOCK")) {
+ info->knock = TRUE;
+ } else if (!g_strcasecmp(key, "CAPAB")) {
+ info->capab = TRUE;
+ } else if (!g_strcasecmp(key, "VCHANNELS")) {
+ info->vchannels = TRUE;
+ } else if (!g_strcasecmp(key, "WHOX")) {
+ info->whox = TRUE;
+ } else if (!g_strcasecmp(key, "CALLERID")) {
+ info->callerid = TRUE;
+ } else if (!g_strcasecmp(key, "ACCEPT")) {
+ info->accept = TRUE;
+ } else if (!g_strcasecmp(key, "KEYLEN")) {
+ info->keylen = atoi(val);
+ } else if (!g_strcasecmp(key, "SILENCE")) {
+ info->silence = atoi(val);
+ } else if (!g_strcasecmp(key, "CHANTYPES")) {
+ g_free(info->chantypes);
+ info->chantypes = g_strdup(val);
+ } else if (!g_strcasecmp(key, "CHANMODES")) {
+ g_strfreev(info->chanmodes);
+ info->chanmodes = g_strsplit(val, ",", 4);
+ /* FIXME: Make sure info->chanmodes length is exactly 4 */
+ } else if (!g_strcasecmp(key, "CHANLIMIT")) {
+ g_free(info->chanlimit);
+ info->chanlimit = g_strdup(val);
+ } else if (!g_strcasecmp(key, "EXCEPTS")) {
+ if (val == NULL)
+ info->excepts_mode = 'e';
+ else if (strlen(val) > 1)
+ log_global(LOG_WARNING, "Invalid length excepts value: %s", val);
+ else
+ info->excepts_mode = val[0];
+ } else if (!g_strcasecmp(key, "INVEX")) {
+ if (val == NULL)
+ info->invex_mode = 'I';
+ else if (strlen(val) > 1)
+ log_global(LOG_WARNING, "Invalid length invex value: %s", val);
+ else
+ info->invex_mode = val[0];
+ } else if (!g_strcasecmp(key, "ELIST")) {
+ int i;
+ for (i = 0; val[i]; i++) {
+ switch (val[i]) {
+ case 'M': info->elist_mask_search = TRUE; break;
+ case 'N': info->elist_inverse_mask_search = TRUE; break;
+ case 'T': info->elist_topic_search = TRUE; break;
+ case 'U': info->elist_usercount_search = TRUE; break;
+ case 'C': info->elist_creation_time_search = TRUE; break;
+ default:
+ log_global(LOG_WARNING, "Unknown ELIST parameter '%c'", val[i]);
+ break;