| 65 |
|
static char *yy_class_name = NULL; |
| 66 |
|
|
| 67 |
|
static dlink_list col_conf_list = { NULL, NULL, 0 }; |
| 68 |
– |
static dlink_list hub_conf_list = { NULL, NULL, 0 }; |
| 69 |
– |
static dlink_list leaf_conf_list = { NULL, NULL, 0 }; |
| 68 |
|
static unsigned int listener_flags = 0; |
| 69 |
|
static unsigned int regex_ban = 0; |
| 70 |
|
static char userbuf[IRCD_BUFSIZE]; |
| 105 |
|
MyFree(item); |
| 106 |
|
} |
| 107 |
|
|
| 110 |
– |
static void |
| 111 |
– |
unhook_hub_leaf_confs(void) |
| 112 |
– |
{ |
| 113 |
– |
dlink_node *ptr; |
| 114 |
– |
dlink_node *next_ptr; |
| 115 |
– |
struct CollectItem *yy_hconf; |
| 116 |
– |
struct CollectItem *yy_lconf; |
| 117 |
– |
|
| 118 |
– |
DLINK_FOREACH_SAFE(ptr, next_ptr, hub_conf_list.head) |
| 119 |
– |
{ |
| 120 |
– |
yy_hconf = ptr->data; |
| 121 |
– |
dlinkDelete(&yy_hconf->node, &hub_conf_list); |
| 122 |
– |
free_collect_item(yy_hconf); |
| 123 |
– |
} |
| 124 |
– |
|
| 125 |
– |
DLINK_FOREACH_SAFE(ptr, next_ptr, leaf_conf_list.head) |
| 126 |
– |
{ |
| 127 |
– |
yy_lconf = ptr->data; |
| 128 |
– |
dlinkDelete(&yy_lconf->node, &leaf_conf_list); |
| 129 |
– |
free_collect_item(yy_lconf); |
| 130 |
– |
} |
| 131 |
– |
} |
| 132 |
– |
|
| 108 |
|
%} |
| 109 |
|
|
| 110 |
|
%union { |
| 122 |
|
%token AUTOCONN |
| 123 |
|
%token T_BLOCK |
| 124 |
|
%token BURST_AWAY |
| 150 |
– |
%token BURST_TOPICWHO |
| 125 |
|
%token BYTES KBYTES MBYTES GBYTES TBYTES |
| 126 |
|
%token CALLER_ID_WAIT |
| 127 |
|
%token CAN_FLOOD |
| 139 |
|
%token DIE |
| 140 |
|
%token DISABLE_AUTH |
| 141 |
|
%token DISABLE_FAKE_CHANNELS |
| 168 |
– |
%token DISABLE_HIDDEN |
| 169 |
– |
%token DISABLE_LOCAL_CHANNELS |
| 142 |
|
%token DISABLE_REMOTE_COMMANDS |
| 143 |
|
%token DOTS_IN_IDENT |
| 144 |
|
%token DURATION |
| 154 |
|
%token GECOS |
| 155 |
|
%token GENERAL |
| 156 |
|
%token GLINE |
| 157 |
< |
%token GLINES |
| 157 |
> |
%token GLINE_DURATION |
| 158 |
> |
%token GLINE_ENABLE |
| 159 |
|
%token GLINE_EXEMPT |
| 160 |
|
%token GLINE_TIME |
| 161 |
+ |
%token GLINE_REQUEST_DURATION |
| 162 |
|
%token GLINE_MIN_CIDR |
| 163 |
|
%token GLINE_MIN_CIDR6 |
| 164 |
|
%token GLOBAL_KILL |
| 190 |
|
%token T_LOG |
| 191 |
|
%token MAX_ACCEPT |
| 192 |
|
%token MAX_BANS |
| 193 |
+ |
%token MAX_CHANS_PER_OPER |
| 194 |
|
%token MAX_CHANS_PER_USER |
| 195 |
|
%token MAX_GLOBAL |
| 196 |
|
%token MAX_IDENT |
| 290 |
|
%token T_CCONN |
| 291 |
|
%token T_CCONN_FULL |
| 292 |
|
%token T_SSL_CIPHER_LIST |
| 318 |
– |
%token T_CLIENT_FLOOD |
| 293 |
|
%token T_DEAF |
| 294 |
|
%token T_DEBUG |
| 295 |
|
%token T_DLINE |
| 303 |
|
%token T_MAX_CLIENTS |
| 304 |
|
%token T_NCHANGE |
| 305 |
|
%token T_OPERWALL |
| 306 |
+ |
%token T_RECVQ |
| 307 |
|
%token T_REJ |
| 308 |
|
%token T_SERVER |
| 309 |
|
%token T_SERVNOTICE |
| 310 |
+ |
%token T_SET |
| 311 |
|
%token T_SKILL |
| 312 |
|
%token T_SPY |
| 313 |
|
%token T_SSL |
| 331 |
|
%token UNKLINE |
| 332 |
|
%token USER |
| 333 |
|
%token USE_EGD |
| 358 |
– |
%token USE_EXCEPT |
| 359 |
– |
%token USE_INVEX |
| 360 |
– |
%token USE_KNOCK |
| 334 |
|
%token USE_LOGGING |
| 335 |
|
%token USE_WHOIS_ACTUALLY |
| 336 |
|
%token VHOST |
| 371 |
|
| deny_entry |
| 372 |
|
| exempt_entry |
| 373 |
|
| general_entry |
| 401 |
– |
| gline_entry |
| 374 |
|
| gecos_entry |
| 375 |
|
| modules_entry |
| 376 |
|
| error ';' |
| 936 |
|
else |
| 937 |
|
DupString(new_aconf->host, "*"); |
| 938 |
|
|
| 939 |
< |
new_aconf->type = parse_netmask(new_aconf->host, &new_aconf->ipnum, |
| 939 |
> |
new_aconf->type = parse_netmask(new_aconf->host, &new_aconf->addr, |
| 940 |
|
&new_aconf->bits); |
| 941 |
|
|
| 942 |
|
conf_add_class_to_conf(new_conf, class_name); |
| 994 |
|
{ |
| 995 |
|
if (conf_parser_ctx.pass == 2) |
| 996 |
|
{ |
| 1025 |
– |
if (strlen(yylval.string) > OPERNICKLEN) |
| 1026 |
– |
yylval.string[OPERNICKLEN] = '\0'; |
| 1027 |
– |
|
| 997 |
|
MyFree(yy_conf->name); |
| 998 |
|
DupString(yy_conf->name, yylval.string); |
| 999 |
|
} |
| 1021 |
|
DupString(yy_aconf->user, userbuf); |
| 1022 |
|
DupString(yy_aconf->host, hostbuf); |
| 1023 |
|
|
| 1024 |
< |
yy_aconf->type = parse_netmask(yy_aconf->host, &yy_aconf->ipnum, |
| 1024 |
> |
yy_aconf->type = parse_netmask(yy_aconf->host, &yy_aconf->addr, |
| 1025 |
|
&yy_aconf->bits); |
| 1026 |
|
} |
| 1027 |
|
else |
| 1274 |
|
{ |
| 1275 |
|
if (conf_parser_ctx.pass == 2) |
| 1276 |
|
yy_aconf->port |= OPER_FLAG_REMOTEBAN; |
| 1277 |
+ |
} | T_SET |
| 1278 |
+ |
{ |
| 1279 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1280 |
+ |
yy_aconf->port |= OPER_FLAG_SET; |
| 1281 |
|
} | MODULE |
| 1282 |
|
{ |
| 1283 |
|
if (conf_parser_ctx.pass == 2) |
| 1350 |
|
class_max_global | |
| 1351 |
|
class_max_local | |
| 1352 |
|
class_max_ident | |
| 1353 |
< |
class_sendq | |
| 1353 |
> |
class_sendq | class_recvq | |
| 1354 |
|
error ';' ; |
| 1355 |
|
|
| 1356 |
|
class_name: NAME '=' QSTRING ';' |
| 1365 |
|
class_ping_time: PING_TIME '=' timespec ';' |
| 1366 |
|
{ |
| 1367 |
|
if (conf_parser_ctx.pass == 1) |
| 1368 |
< |
PingFreq(yy_class) = $3; |
| 1368 |
> |
yy_class->ping_freq = $3; |
| 1369 |
|
}; |
| 1370 |
|
|
| 1371 |
|
class_ping_warning: PING_WARNING '=' timespec ';' |
| 1372 |
|
{ |
| 1373 |
|
if (conf_parser_ctx.pass == 1) |
| 1374 |
< |
PingWarning(yy_class) = $3; |
| 1374 |
> |
yy_class->ping_warning = $3; |
| 1375 |
|
}; |
| 1376 |
|
|
| 1377 |
|
class_number_per_ip: NUMBER_PER_IP '=' NUMBER ';' |
| 1378 |
|
{ |
| 1379 |
|
if (conf_parser_ctx.pass == 1) |
| 1380 |
< |
MaxPerIp(yy_class) = $3; |
| 1380 |
> |
yy_class->max_perip = $3; |
| 1381 |
|
}; |
| 1382 |
|
|
| 1383 |
|
class_connectfreq: CONNECTFREQ '=' timespec ';' |
| 1384 |
|
{ |
| 1385 |
|
if (conf_parser_ctx.pass == 1) |
| 1386 |
< |
ConFreq(yy_class) = $3; |
| 1386 |
> |
yy_class->con_freq = $3; |
| 1387 |
|
}; |
| 1388 |
|
|
| 1389 |
|
class_max_number: MAX_NUMBER '=' NUMBER ';' |
| 1390 |
|
{ |
| 1391 |
|
if (conf_parser_ctx.pass == 1) |
| 1392 |
< |
MaxTotal(yy_class) = $3; |
| 1392 |
> |
yy_class->max_total = $3; |
| 1393 |
|
}; |
| 1394 |
|
|
| 1395 |
|
class_max_global: MAX_GLOBAL '=' NUMBER ';' |
| 1396 |
|
{ |
| 1397 |
|
if (conf_parser_ctx.pass == 1) |
| 1398 |
< |
MaxGlobal(yy_class) = $3; |
| 1398 |
> |
yy_class->max_global = $3; |
| 1399 |
|
}; |
| 1400 |
|
|
| 1401 |
|
class_max_local: MAX_LOCAL '=' NUMBER ';' |
| 1402 |
|
{ |
| 1403 |
|
if (conf_parser_ctx.pass == 1) |
| 1404 |
< |
MaxLocal(yy_class) = $3; |
| 1404 |
> |
yy_class->max_local = $3; |
| 1405 |
|
}; |
| 1406 |
|
|
| 1407 |
|
class_max_ident: MAX_IDENT '=' NUMBER ';' |
| 1408 |
|
{ |
| 1409 |
|
if (conf_parser_ctx.pass == 1) |
| 1410 |
< |
MaxIdent(yy_class) = $3; |
| 1410 |
> |
yy_class->max_ident = $3; |
| 1411 |
|
}; |
| 1412 |
|
|
| 1413 |
|
class_sendq: SENDQ '=' sizespec ';' |
| 1414 |
|
{ |
| 1415 |
|
if (conf_parser_ctx.pass == 1) |
| 1416 |
< |
MaxSendq(yy_class) = $3; |
| 1416 |
> |
yy_class->max_sendq = $3; |
| 1417 |
> |
}; |
| 1418 |
> |
|
| 1419 |
> |
class_recvq: T_RECVQ '=' sizespec ';' |
| 1420 |
> |
{ |
| 1421 |
> |
if (conf_parser_ctx.pass == 1) |
| 1422 |
> |
if ($3 >= CLIENT_FLOOD_MIN && $3 <= CLIENT_FLOOD_MAX) |
| 1423 |
> |
yy_class->max_recvq = $3; |
| 1424 |
|
}; |
| 1425 |
|
|
| 1426 |
|
class_cidr_bitlen_ipv4: CIDR_BITLEN_IPV4 '=' NUMBER ';' |
| 1427 |
|
{ |
| 1428 |
|
if (conf_parser_ctx.pass == 1) |
| 1429 |
< |
CidrBitlenIPV4(yy_class) = $3; |
| 1429 |
> |
yy_class->cidr_bitlen_ipv4 = $3 > 32 ? 32 : $3; |
| 1430 |
|
}; |
| 1431 |
|
|
| 1432 |
|
class_cidr_bitlen_ipv6: CIDR_BITLEN_IPV6 '=' NUMBER ';' |
| 1433 |
|
{ |
| 1434 |
|
if (conf_parser_ctx.pass == 1) |
| 1435 |
< |
CidrBitlenIPV6(yy_class) = $3; |
| 1435 |
> |
yy_class->cidr_bitlen_ipv6 = $3 > 128 ? 128 : $3; |
| 1436 |
|
}; |
| 1437 |
|
|
| 1438 |
|
class_number_per_cidr: NUMBER_PER_CIDR '=' NUMBER ';' |
| 1439 |
|
{ |
| 1440 |
|
if (conf_parser_ctx.pass == 1) |
| 1441 |
< |
NumberPerCidr(yy_class) = $3; |
| 1441 |
> |
yy_class->number_per_cidr = $3; |
| 1442 |
|
}; |
| 1443 |
|
|
| 1444 |
|
/*************************************************************************** |
| 1653 |
|
} |
| 1654 |
|
}; |
| 1655 |
|
|
| 1676 |
– |
/* XXX - IP/IPV6 tags don't exist anymore - put IP/IPV6 into user. */ |
| 1677 |
– |
|
| 1656 |
|
auth_passwd: PASSWORD '=' QSTRING ';' |
| 1657 |
|
{ |
| 1658 |
|
if (conf_parser_ctx.pass == 2) |
| 2047 |
|
{ |
| 2048 |
|
if (conf_parser_ctx.pass == 2) |
| 2049 |
|
{ |
| 2050 |
< |
struct CollectItem *yy_hconf=NULL; |
| 2073 |
< |
struct CollectItem *yy_lconf=NULL; |
| 2074 |
< |
dlink_node *ptr = NULL, *next_ptr = NULL; |
| 2075 |
< |
|
| 2076 |
< |
if (yy_aconf->host && |
| 2077 |
< |
yy_aconf->passwd && yy_aconf->spasswd) |
| 2050 |
> |
if (yy_aconf->host && yy_aconf->passwd && yy_aconf->spasswd) |
| 2051 |
|
{ |
| 2052 |
|
if (conf_add_server(yy_conf, class_name) == -1) |
| 2080 |
– |
{ |
| 2053 |
|
delete_conf_item(yy_conf); |
| 2082 |
– |
yy_conf = NULL; |
| 2083 |
– |
yy_aconf = NULL; |
| 2084 |
– |
} |
| 2054 |
|
} |
| 2055 |
|
else |
| 2056 |
|
{ |
| 2088 |
– |
/* Even if yy_conf ->name is NULL |
| 2089 |
– |
* should still unhook any hub/leaf confs still pending |
| 2090 |
– |
*/ |
| 2091 |
– |
unhook_hub_leaf_confs(); |
| 2092 |
– |
|
| 2057 |
|
if (yy_conf->name != NULL) |
| 2058 |
|
{ |
| 2059 |
|
if (yy_aconf->host == NULL) |
| 2062 |
|
yyerror("Ignoring connect block -- missing password"); |
| 2063 |
|
} |
| 2064 |
|
|
| 2101 |
– |
|
| 2065 |
|
/* XXX |
| 2066 |
|
* This fixes a try_connections() core (caused by invalid class_ptr |
| 2067 |
|
* pointers) reported by metalrock. That's an ugly fix, but there |
| 2070 |
|
* a doubly linked list immediately without any sanity checks! -Michael |
| 2071 |
|
*/ |
| 2072 |
|
delete_conf_item(yy_conf); |
| 2110 |
– |
|
| 2111 |
– |
yy_aconf = NULL; |
| 2112 |
– |
yy_conf = NULL; |
| 2073 |
|
} |
| 2074 |
|
|
| 2075 |
< |
/* |
| 2076 |
< |
* yy_conf is still pointing at the server that is having |
| 2077 |
< |
* a connect block built for it. This means, y_aconf->name |
| 2078 |
< |
* points to the actual irc name this server will be known as. |
| 2119 |
< |
* Now this new server has a set or even just one hub_mask (or leaf_mask) |
| 2120 |
< |
* given in the link list at yy_hconf. Fill in the HUB confs |
| 2121 |
< |
* from this link list now. |
| 2122 |
< |
*/ |
| 2123 |
< |
DLINK_FOREACH_SAFE(ptr, next_ptr, hub_conf_list.head) |
| 2124 |
< |
{ |
| 2125 |
< |
struct ConfItem *new_hub_conf; |
| 2126 |
< |
struct MatchItem *match_item; |
| 2127 |
< |
|
| 2128 |
< |
yy_hconf = ptr->data; |
| 2129 |
< |
|
| 2130 |
< |
/* yy_conf == NULL is a fatal error for this connect block! */ |
| 2131 |
< |
if ((yy_conf != NULL) && (yy_conf->name != NULL)) |
| 2132 |
< |
{ |
| 2133 |
< |
new_hub_conf = make_conf_item(HUB_TYPE); |
| 2134 |
< |
match_item = (struct MatchItem *)map_to_conf(new_hub_conf); |
| 2135 |
< |
DupString(new_hub_conf->name, yy_conf->name); |
| 2136 |
< |
if (yy_hconf->user != NULL) |
| 2137 |
< |
DupString(match_item->user, yy_hconf->user); |
| 2138 |
< |
else |
| 2139 |
< |
DupString(match_item->user, "*"); |
| 2140 |
< |
if (yy_hconf->host != NULL) |
| 2141 |
< |
DupString(match_item->host, yy_hconf->host); |
| 2142 |
< |
else |
| 2143 |
< |
DupString(match_item->host, "*"); |
| 2144 |
< |
} |
| 2145 |
< |
dlinkDelete(&yy_hconf->node, &hub_conf_list); |
| 2146 |
< |
free_collect_item(yy_hconf); |
| 2147 |
< |
} |
| 2148 |
< |
|
| 2149 |
< |
/* Ditto for the LEAF confs */ |
| 2150 |
< |
|
| 2151 |
< |
DLINK_FOREACH_SAFE(ptr, next_ptr, leaf_conf_list.head) |
| 2152 |
< |
{ |
| 2153 |
< |
struct ConfItem *new_leaf_conf; |
| 2154 |
< |
struct MatchItem *match_item; |
| 2155 |
< |
|
| 2156 |
< |
yy_lconf = ptr->data; |
| 2157 |
< |
|
| 2158 |
< |
if ((yy_conf != NULL) && (yy_conf->name != NULL)) |
| 2159 |
< |
{ |
| 2160 |
< |
new_leaf_conf = make_conf_item(LEAF_TYPE); |
| 2161 |
< |
match_item = (struct MatchItem *)map_to_conf(new_leaf_conf); |
| 2162 |
< |
DupString(new_leaf_conf->name, yy_conf->name); |
| 2163 |
< |
if (yy_lconf->user != NULL) |
| 2164 |
< |
DupString(match_item->user, yy_lconf->user); |
| 2165 |
< |
else |
| 2166 |
< |
DupString(match_item->user, "*"); |
| 2167 |
< |
if (yy_lconf->host != NULL) |
| 2168 |
< |
DupString(match_item->host, yy_lconf->host); |
| 2169 |
< |
else |
| 2170 |
< |
DupString(match_item->host, "*"); |
| 2171 |
< |
} |
| 2172 |
< |
dlinkDelete(&yy_lconf->node, &leaf_conf_list); |
| 2173 |
< |
free_collect_item(yy_lconf); |
| 2174 |
< |
} |
| 2175 |
< |
MyFree(class_name); |
| 2176 |
< |
class_name = NULL; |
| 2177 |
< |
yy_conf = NULL; |
| 2178 |
< |
yy_aconf = NULL; |
| 2075 |
> |
MyFree(class_name); |
| 2076 |
> |
class_name = NULL; |
| 2077 |
> |
yy_conf = NULL; |
| 2078 |
> |
yy_aconf = NULL; |
| 2079 |
|
} |
| 2080 |
|
}; |
| 2081 |
|
|
| 2091 |
|
{ |
| 2092 |
|
if (conf_parser_ctx.pass == 2) |
| 2093 |
|
{ |
| 2194 |
– |
if (yy_conf->name != NULL) |
| 2195 |
– |
yyerror("Multiple connect name entry"); |
| 2196 |
– |
|
| 2094 |
|
MyFree(yy_conf->name); |
| 2095 |
|
DupString(yy_conf->name, yylval.string); |
| 2096 |
|
} |
| 2123 |
|
{ |
| 2124 |
|
assert(res != NULL); |
| 2125 |
|
|
| 2126 |
< |
memcpy(&yy_aconf->my_ipnum, res->ai_addr, res->ai_addrlen); |
| 2127 |
< |
yy_aconf->my_ipnum.ss.ss_family = res->ai_family; |
| 2128 |
< |
yy_aconf->my_ipnum.ss_len = res->ai_addrlen; |
| 2126 |
> |
memcpy(&yy_aconf->bind, res->ai_addr, res->ai_addrlen); |
| 2127 |
> |
yy_aconf->bind.ss.ss_family = res->ai_family; |
| 2128 |
> |
yy_aconf->bind.ss_len = res->ai_addrlen; |
| 2129 |
|
freeaddrinfo(res); |
| 2130 |
|
} |
| 2131 |
|
} |
| 2223 |
|
{ |
| 2224 |
|
if (conf_parser_ctx.pass == 2) |
| 2225 |
|
{ |
| 2226 |
< |
struct CollectItem *yy_tmp; |
| 2226 |
> |
char *mask; |
| 2227 |
|
|
| 2228 |
< |
yy_tmp = (struct CollectItem *)MyMalloc(sizeof(struct CollectItem)); |
| 2229 |
< |
DupString(yy_tmp->host, yylval.string); |
| 2333 |
< |
DupString(yy_tmp->user, "*"); |
| 2334 |
< |
dlinkAdd(yy_tmp, &yy_tmp->node, &hub_conf_list); |
| 2228 |
> |
DupString(mask, yylval.string); |
| 2229 |
> |
dlinkAdd(mask, make_dlink_node(), &yy_aconf->hub_list); |
| 2230 |
|
} |
| 2231 |
|
}; |
| 2232 |
|
|
| 2234 |
|
{ |
| 2235 |
|
if (conf_parser_ctx.pass == 2) |
| 2236 |
|
{ |
| 2237 |
< |
struct CollectItem *yy_tmp; |
| 2237 |
> |
char *mask; |
| 2238 |
|
|
| 2239 |
< |
yy_tmp = (struct CollectItem *)MyMalloc(sizeof(struct CollectItem)); |
| 2240 |
< |
DupString(yy_tmp->host, yylval.string); |
| 2346 |
< |
DupString(yy_tmp->user, "*"); |
| 2347 |
< |
dlinkAdd(yy_tmp, &yy_tmp->node, &leaf_conf_list); |
| 2239 |
> |
DupString(mask, yylval.string); |
| 2240 |
> |
dlinkAdd(mask, make_dlink_node(), &yy_aconf->leaf_list); |
| 2241 |
|
} |
| 2242 |
|
}; |
| 2243 |
|
|
| 2314 |
|
} |
| 2315 |
|
else |
| 2316 |
|
{ |
| 2317 |
+ |
find_and_delete_temporary(userbuf, hostbuf, CONF_KLINE); |
| 2318 |
+ |
|
| 2319 |
|
yy_aconf = map_to_conf(make_conf_item(KLINE_TYPE)); |
| 2320 |
|
|
| 2321 |
|
DupString(yy_aconf->user, userbuf); |
| 2325 |
|
DupString(yy_aconf->reason, reasonbuf); |
| 2326 |
|
else |
| 2327 |
|
DupString(yy_aconf->reason, "No reason"); |
| 2328 |
< |
add_conf_by_address(CONF_KILL, yy_aconf); |
| 2328 |
> |
add_conf_by_address(CONF_KLINE, yy_aconf); |
| 2329 |
|
} |
| 2330 |
|
} |
| 2331 |
|
|
| 2385 |
|
{ |
| 2386 |
|
if (hostbuf[0] && parse_netmask(hostbuf, NULL, NULL) != HM_HOST) |
| 2387 |
|
{ |
| 2388 |
+ |
find_and_delete_temporary(NULL, hostbuf, CONF_DLINE); |
| 2389 |
+ |
|
| 2390 |
|
yy_aconf = map_to_conf(make_conf_item(DLINE_TYPE)); |
| 2391 |
|
DupString(yy_aconf->host, hostbuf); |
| 2392 |
|
|
| 2541 |
|
general_opers_bypass_callerid | general_default_floodcount | |
| 2542 |
|
general_min_nonwildcard | general_min_nonwildcard_simple | |
| 2543 |
|
general_disable_remote_commands | |
| 2647 |
– |
general_client_flood | |
| 2544 |
|
general_throttle_time | general_havent_read_conf | |
| 2545 |
|
general_ping_cookie | |
| 2546 |
|
general_disable_auth | |
| 2547 |
< |
general_tkline_expire_notices | general_gline_min_cidr | |
| 2547 |
> |
general_tkline_expire_notices | general_gline_enable | |
| 2548 |
> |
general_gline_duration | general_gline_request_duration | |
| 2549 |
> |
general_gline_min_cidr | |
| 2550 |
|
general_gline_min_cidr6 | general_use_whois_actually | |
| 2551 |
|
general_reject_hold_time | general_stats_e_disabled | |
| 2552 |
|
general_max_watch | general_services_name | |
| 2558 |
|
ConfigFileEntry.max_watch = $3; |
| 2559 |
|
}; |
| 2560 |
|
|
| 2561 |
+ |
general_gline_enable: GLINE_ENABLE '=' TBOOL ';' |
| 2562 |
+ |
{ |
| 2563 |
+ |
if (conf_parser_ctx.pass == 2) |
| 2564 |
+ |
ConfigFileEntry.glines = yylval.number; |
| 2565 |
+ |
}; |
| 2566 |
+ |
|
| 2567 |
+ |
general_gline_duration: GLINE_DURATION '=' timespec ';' |
| 2568 |
+ |
{ |
| 2569 |
+ |
if (conf_parser_ctx.pass == 2) |
| 2570 |
+ |
ConfigFileEntry.gline_time = $3; |
| 2571 |
+ |
}; |
| 2572 |
+ |
|
| 2573 |
+ |
general_gline_request_duration: GLINE_REQUEST_DURATION '=' timespec ';' |
| 2574 |
+ |
{ |
| 2575 |
+ |
if (conf_parser_ctx.pass == 2) |
| 2576 |
+ |
ConfigFileEntry.gline_request_time = $3; |
| 2577 |
+ |
}; |
| 2578 |
+ |
|
| 2579 |
|
general_gline_min_cidr: GLINE_MIN_CIDR '=' NUMBER ';' |
| 2580 |
|
{ |
| 2581 |
|
ConfigFileEntry.gline_min_cidr = $3; |
| 2978 |
|
ConfigFileEntry.default_floodcount = $3; |
| 2979 |
|
}; |
| 2980 |
|
|
| 3065 |
– |
general_client_flood: T_CLIENT_FLOOD '=' sizespec ';' |
| 3066 |
– |
{ |
| 3067 |
– |
ConfigFileEntry.client_flood = $3; |
| 3068 |
– |
}; |
| 3069 |
– |
|
| 3070 |
– |
|
| 3071 |
– |
/*************************************************************************** |
| 3072 |
– |
* section glines |
| 3073 |
– |
***************************************************************************/ |
| 3074 |
– |
gline_entry: GLINES |
| 3075 |
– |
{ |
| 3076 |
– |
if (conf_parser_ctx.pass == 2) |
| 3077 |
– |
{ |
| 3078 |
– |
yy_conf = make_conf_item(GDENY_TYPE); |
| 3079 |
– |
yy_aconf = map_to_conf(yy_conf); |
| 3080 |
– |
} |
| 3081 |
– |
} '{' gline_items '}' ';' |
| 3082 |
– |
{ |
| 3083 |
– |
if (conf_parser_ctx.pass == 2) |
| 3084 |
– |
{ |
| 3085 |
– |
/* |
| 3086 |
– |
* since we re-allocate yy_conf/yy_aconf after the end of action=, at the |
| 3087 |
– |
* end we will have one extra, so we should free it. |
| 3088 |
– |
*/ |
| 3089 |
– |
if (yy_conf->name == NULL || yy_aconf->user == NULL) |
| 3090 |
– |
{ |
| 3091 |
– |
delete_conf_item(yy_conf); |
| 3092 |
– |
yy_conf = NULL; |
| 3093 |
– |
yy_aconf = NULL; |
| 3094 |
– |
} |
| 3095 |
– |
} |
| 3096 |
– |
}; |
| 3097 |
– |
|
| 3098 |
– |
gline_items: gline_items gline_item | gline_item; |
| 3099 |
– |
gline_item: gline_enable | |
| 3100 |
– |
gline_duration | |
| 3101 |
– |
gline_logging | |
| 3102 |
– |
gline_user | |
| 3103 |
– |
gline_server | |
| 3104 |
– |
gline_action | |
| 3105 |
– |
error; |
| 3106 |
– |
|
| 3107 |
– |
gline_enable: ENABLE '=' TBOOL ';' |
| 3108 |
– |
{ |
| 3109 |
– |
if (conf_parser_ctx.pass == 2) |
| 3110 |
– |
ConfigFileEntry.glines = yylval.number; |
| 3111 |
– |
}; |
| 3112 |
– |
|
| 3113 |
– |
gline_duration: DURATION '=' timespec ';' |
| 3114 |
– |
{ |
| 3115 |
– |
if (conf_parser_ctx.pass == 2) |
| 3116 |
– |
ConfigFileEntry.gline_time = $3; |
| 3117 |
– |
}; |
| 3118 |
– |
|
| 3119 |
– |
gline_logging: T_LOG |
| 3120 |
– |
{ |
| 3121 |
– |
if (conf_parser_ctx.pass == 2) |
| 3122 |
– |
ConfigFileEntry.gline_logging = 0; |
| 3123 |
– |
} '=' gline_logging_types ';'; |
| 3124 |
– |
gline_logging_types: gline_logging_types ',' gline_logging_type_item | gline_logging_type_item; |
| 3125 |
– |
gline_logging_type_item: T_REJECT |
| 3126 |
– |
{ |
| 3127 |
– |
if (conf_parser_ctx.pass == 2) |
| 3128 |
– |
ConfigFileEntry.gline_logging |= GDENY_REJECT; |
| 3129 |
– |
} | T_BLOCK |
| 3130 |
– |
{ |
| 3131 |
– |
if (conf_parser_ctx.pass == 2) |
| 3132 |
– |
ConfigFileEntry.gline_logging |= GDENY_BLOCK; |
| 3133 |
– |
}; |
| 3134 |
– |
|
| 3135 |
– |
gline_user: USER '=' QSTRING ';' |
| 3136 |
– |
{ |
| 3137 |
– |
if (conf_parser_ctx.pass == 2) |
| 3138 |
– |
{ |
| 3139 |
– |
struct split_nuh_item nuh; |
| 3140 |
– |
|
| 3141 |
– |
nuh.nuhmask = yylval.string; |
| 3142 |
– |
nuh.nickptr = NULL; |
| 3143 |
– |
nuh.userptr = userbuf; |
| 3144 |
– |
nuh.hostptr = hostbuf; |
| 3145 |
– |
|
| 3146 |
– |
nuh.nicksize = 0; |
| 3147 |
– |
nuh.usersize = sizeof(userbuf); |
| 3148 |
– |
nuh.hostsize = sizeof(hostbuf); |
| 3149 |
– |
|
| 3150 |
– |
split_nuh(&nuh); |
| 3151 |
– |
|
| 3152 |
– |
if (yy_aconf->user == NULL) |
| 3153 |
– |
{ |
| 3154 |
– |
DupString(yy_aconf->user, userbuf); |
| 3155 |
– |
DupString(yy_aconf->host, hostbuf); |
| 3156 |
– |
} |
| 3157 |
– |
else |
| 3158 |
– |
{ |
| 3159 |
– |
struct CollectItem *yy_tmp = MyMalloc(sizeof(struct CollectItem)); |
| 3160 |
– |
|
| 3161 |
– |
DupString(yy_tmp->user, userbuf); |
| 3162 |
– |
DupString(yy_tmp->host, hostbuf); |
| 3163 |
– |
|
| 3164 |
– |
dlinkAdd(yy_tmp, &yy_tmp->node, &col_conf_list); |
| 3165 |
– |
} |
| 3166 |
– |
} |
| 3167 |
– |
}; |
| 3168 |
– |
|
| 3169 |
– |
gline_server: NAME '=' QSTRING ';' |
| 3170 |
– |
{ |
| 3171 |
– |
if (conf_parser_ctx.pass == 2) |
| 3172 |
– |
{ |
| 3173 |
– |
MyFree(yy_conf->name); |
| 3174 |
– |
DupString(yy_conf->name, yylval.string); |
| 3175 |
– |
} |
| 3176 |
– |
}; |
| 3177 |
– |
|
| 3178 |
– |
gline_action: ACTION |
| 3179 |
– |
{ |
| 3180 |
– |
if (conf_parser_ctx.pass == 2) |
| 3181 |
– |
yy_aconf->flags = 0; |
| 3182 |
– |
} '=' gdeny_types ';' |
| 3183 |
– |
{ |
| 3184 |
– |
if (conf_parser_ctx.pass == 2) |
| 3185 |
– |
{ |
| 3186 |
– |
struct CollectItem *yy_tmp = NULL; |
| 3187 |
– |
dlink_node *ptr, *next_ptr; |
| 3188 |
– |
|
| 3189 |
– |
DLINK_FOREACH_SAFE(ptr, next_ptr, col_conf_list.head) |
| 3190 |
– |
{ |
| 3191 |
– |
struct AccessItem *new_aconf; |
| 3192 |
– |
struct ConfItem *new_conf; |
| 3193 |
– |
|
| 3194 |
– |
yy_tmp = ptr->data; |
| 3195 |
– |
new_conf = make_conf_item(GDENY_TYPE); |
| 3196 |
– |
new_aconf = map_to_conf(new_conf); |
| 3197 |
– |
|
| 3198 |
– |
new_aconf->flags = yy_aconf->flags; |
| 3199 |
– |
|
| 3200 |
– |
if (yy_conf->name != NULL) |
| 3201 |
– |
DupString(new_conf->name, yy_conf->name); |
| 3202 |
– |
else |
| 3203 |
– |
DupString(new_conf->name, "*"); |
| 3204 |
– |
if (yy_aconf->user != NULL) |
| 3205 |
– |
DupString(new_aconf->user, yy_tmp->user); |
| 3206 |
– |
else |
| 3207 |
– |
DupString(new_aconf->user, "*"); |
| 3208 |
– |
if (yy_aconf->host != NULL) |
| 3209 |
– |
DupString(new_aconf->host, yy_tmp->host); |
| 3210 |
– |
else |
| 3211 |
– |
DupString(new_aconf->host, "*"); |
| 3212 |
– |
|
| 3213 |
– |
dlinkDelete(&yy_tmp->node, &col_conf_list); |
| 3214 |
– |
} |
| 3215 |
– |
|
| 3216 |
– |
/* |
| 3217 |
– |
* In case someone has fed us with more than one action= after user/name |
| 3218 |
– |
* which would leak memory -Michael |
| 3219 |
– |
*/ |
| 3220 |
– |
if (yy_conf->name == NULL || yy_aconf->user == NULL) |
| 3221 |
– |
delete_conf_item(yy_conf); |
| 3222 |
– |
|
| 3223 |
– |
yy_conf = make_conf_item(GDENY_TYPE); |
| 3224 |
– |
yy_aconf = map_to_conf(yy_conf); |
| 3225 |
– |
} |
| 3226 |
– |
}; |
| 3227 |
– |
|
| 3228 |
– |
gdeny_types: gdeny_types ',' gdeny_type_item | gdeny_type_item; |
| 3229 |
– |
gdeny_type_item: T_REJECT |
| 3230 |
– |
{ |
| 3231 |
– |
if (conf_parser_ctx.pass == 2) |
| 3232 |
– |
yy_aconf->flags |= GDENY_REJECT; |
| 3233 |
– |
} | T_BLOCK |
| 3234 |
– |
{ |
| 3235 |
– |
if (conf_parser_ctx.pass == 2) |
| 3236 |
– |
yy_aconf->flags |= GDENY_BLOCK; |
| 3237 |
– |
}; |
| 2981 |
|
|
| 2982 |
|
/*************************************************************************** |
| 2983 |
|
* section channel |
| 2986 |
|
'{' channel_items '}' ';'; |
| 2987 |
|
|
| 2988 |
|
channel_items: channel_items channel_item | channel_item; |
| 2989 |
< |
channel_item: channel_disable_local_channels | channel_use_except | |
| 2990 |
< |
channel_use_invex | channel_use_knock | |
| 2991 |
< |
channel_max_bans | channel_knock_delay | |
| 3249 |
< |
channel_knock_delay_channel | channel_max_chans_per_user | |
| 2989 |
> |
channel_item: channel_max_bans | |
| 2990 |
> |
channel_knock_delay | channel_knock_delay_channel | |
| 2991 |
> |
channel_max_chans_per_user | channel_max_chans_per_oper | |
| 2992 |
|
channel_quiet_on_ban | channel_default_split_user_count | |
| 2993 |
|
channel_default_split_server_count | |
| 2994 |
|
channel_no_create_on_split | channel_restrict_channels | |
| 2995 |
< |
channel_no_join_on_split | channel_burst_topicwho | |
| 2995 |
> |
channel_no_join_on_split | |
| 2996 |
|
channel_jflood_count | channel_jflood_time | |
| 2997 |
|
channel_disable_fake_channels | error; |
| 2998 |
|
|
| 3006 |
|
ConfigChannel.restrict_channels = yylval.number; |
| 3007 |
|
}; |
| 3008 |
|
|
| 3267 |
– |
channel_disable_local_channels: DISABLE_LOCAL_CHANNELS '=' TBOOL ';' |
| 3268 |
– |
{ |
| 3269 |
– |
ConfigChannel.disable_local_channels = yylval.number; |
| 3270 |
– |
}; |
| 3271 |
– |
|
| 3272 |
– |
channel_use_except: USE_EXCEPT '=' TBOOL ';' |
| 3273 |
– |
{ |
| 3274 |
– |
ConfigChannel.use_except = yylval.number; |
| 3275 |
– |
}; |
| 3276 |
– |
|
| 3277 |
– |
channel_use_invex: USE_INVEX '=' TBOOL ';' |
| 3278 |
– |
{ |
| 3279 |
– |
ConfigChannel.use_invex = yylval.number; |
| 3280 |
– |
}; |
| 3281 |
– |
|
| 3282 |
– |
channel_use_knock: USE_KNOCK '=' TBOOL ';' |
| 3283 |
– |
{ |
| 3284 |
– |
ConfigChannel.use_knock = yylval.number; |
| 3285 |
– |
}; |
| 3286 |
– |
|
| 3009 |
|
channel_knock_delay: KNOCK_DELAY '=' timespec ';' |
| 3010 |
|
{ |
| 3011 |
|
ConfigChannel.knock_delay = $3; |
| 3021 |
|
ConfigChannel.max_chans_per_user = $3; |
| 3022 |
|
}; |
| 3023 |
|
|
| 3024 |
+ |
channel_max_chans_per_oper: MAX_CHANS_PER_OPER '=' NUMBER ';' |
| 3025 |
+ |
{ |
| 3026 |
+ |
ConfigChannel.max_chans_per_oper = $3; |
| 3027 |
+ |
}; |
| 3028 |
+ |
|
| 3029 |
|
channel_quiet_on_ban: QUIET_ON_BAN '=' TBOOL ';' |
| 3030 |
|
{ |
| 3031 |
|
ConfigChannel.quiet_on_ban = yylval.number; |
| 3056 |
|
ConfigChannel.no_join_on_split = yylval.number; |
| 3057 |
|
}; |
| 3058 |
|
|
| 3332 |
– |
channel_burst_topicwho: BURST_TOPICWHO '=' TBOOL ';' |
| 3333 |
– |
{ |
| 3334 |
– |
ConfigChannel.burst_topicwho = yylval.number; |
| 3335 |
– |
}; |
| 3336 |
– |
|
| 3059 |
|
channel_jflood_count: JOIN_FLOOD_COUNT '=' NUMBER ';' |
| 3060 |
|
{ |
| 3061 |
|
GlobalSetOptions.joinfloodcount = yylval.number; |
| 3075 |
|
serverhide_items: serverhide_items serverhide_item | serverhide_item; |
| 3076 |
|
serverhide_item: serverhide_flatten_links | serverhide_hide_servers | |
| 3077 |
|
serverhide_links_delay | |
| 3356 |
– |
serverhide_disable_hidden | |
| 3078 |
|
serverhide_hidden | serverhide_hidden_name | |
| 3079 |
|
serverhide_hide_server_ips | |
| 3080 |
|
error; |
| 3120 |
|
ConfigServerHide.hidden = yylval.number; |
| 3121 |
|
}; |
| 3122 |
|
|
| 3402 |
– |
serverhide_disable_hidden: DISABLE_HIDDEN '=' TBOOL ';' |
| 3403 |
– |
{ |
| 3404 |
– |
if (conf_parser_ctx.pass == 2) |
| 3405 |
– |
ConfigServerHide.disable_hidden = yylval.number; |
| 3406 |
– |
}; |
| 3407 |
– |
|
| 3123 |
|
serverhide_hide_server_ips: HIDE_SERVER_IPS '=' TBOOL ';' |
| 3124 |
|
{ |
| 3125 |
|
if (conf_parser_ctx.pass == 2) |