73 |
|
|
74 |
|
static char *resv_reason = NULL; |
75 |
|
static char *listener_address = NULL; |
76 |
– |
static int not_atom = 0; |
76 |
|
|
77 |
|
struct CollectItem |
78 |
|
{ |
253 |
|
%token NO_JOIN_ON_SPLIT |
254 |
|
%token NO_OPER_FLOOD |
255 |
|
%token NO_TILDE |
257 |
– |
%token NOT |
256 |
|
%token NUMBER |
257 |
|
%token NUMBER_PER_IDENT |
258 |
|
%token NUMBER_PER_CIDR |
360 |
|
%token T_UNXLINE |
361 |
|
%token T_GLOBOPS |
362 |
|
%token T_WALLOP |
363 |
+ |
%token T_RESTART |
364 |
|
%token T_SERVICE |
365 |
|
%token T_SERVICES_NAME |
366 |
|
%token THROTTLE_TIME |
1244 |
|
|
1245 |
|
oper_flags: IRCD_FLAGS |
1246 |
|
{ |
1247 |
+ |
if (conf_parser_ctx.pass == 2) |
1248 |
+ |
yy_aconf->port = 0; |
1249 |
|
} '=' oper_flags_items ';'; |
1250 |
|
|
1251 |
|
oper_flags_items: oper_flags_items ',' oper_flags_item | oper_flags_item; |
1252 |
< |
oper_flags_item: NOT { not_atom = 1; } oper_flags_item_atom |
1252 |
< |
| { not_atom = 0; } oper_flags_item_atom; |
1253 |
< |
|
1254 |
< |
oper_flags_item_atom: GLOBAL_KILL |
1252 |
> |
oper_flags_item: GLOBAL_KILL |
1253 |
|
{ |
1254 |
|
if (conf_parser_ctx.pass == 2) |
1255 |
< |
{ |
1258 |
< |
if (not_atom)yy_aconf->port &= ~OPER_FLAG_GLOBAL_KILL; |
1259 |
< |
else yy_aconf->port |= OPER_FLAG_GLOBAL_KILL; |
1260 |
< |
} |
1255 |
> |
yy_aconf->port |= OPER_FLAG_GLOBAL_KILL; |
1256 |
|
} | REMOTE |
1257 |
|
{ |
1258 |
|
if (conf_parser_ctx.pass == 2) |
1259 |
< |
{ |
1265 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_REMOTE; |
1266 |
< |
else yy_aconf->port |= OPER_FLAG_REMOTE; |
1267 |
< |
} |
1259 |
> |
yy_aconf->port |= OPER_FLAG_REMOTE; |
1260 |
|
} | KLINE |
1261 |
|
{ |
1262 |
|
if (conf_parser_ctx.pass == 2) |
1263 |
< |
{ |
1272 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_K; |
1273 |
< |
else yy_aconf->port |= OPER_FLAG_K; |
1274 |
< |
} |
1263 |
> |
yy_aconf->port |= OPER_FLAG_K; |
1264 |
|
} | UNKLINE |
1265 |
|
{ |
1266 |
|
if (conf_parser_ctx.pass == 2) |
1267 |
< |
{ |
1279 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_UNKLINE; |
1280 |
< |
else yy_aconf->port |= OPER_FLAG_UNKLINE; |
1281 |
< |
} |
1267 |
> |
yy_aconf->port |= OPER_FLAG_UNKLINE; |
1268 |
|
} | XLINE |
1269 |
|
{ |
1270 |
|
if (conf_parser_ctx.pass == 2) |
1271 |
< |
{ |
1286 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_X; |
1287 |
< |
else yy_aconf->port |= OPER_FLAG_X; |
1288 |
< |
} |
1271 |
> |
yy_aconf->port |= OPER_FLAG_X; |
1272 |
|
} | GLINE |
1273 |
|
{ |
1274 |
|
if (conf_parser_ctx.pass == 2) |
1275 |
< |
{ |
1293 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_GLINE; |
1294 |
< |
else yy_aconf->port |= OPER_FLAG_GLINE; |
1295 |
< |
} |
1275 |
> |
yy_aconf->port |= OPER_FLAG_GLINE; |
1276 |
|
} | DIE |
1277 |
|
{ |
1278 |
|
if (conf_parser_ctx.pass == 2) |
1279 |
< |
{ |
1280 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_DIE; |
1281 |
< |
else yy_aconf->port |= OPER_FLAG_DIE; |
1282 |
< |
} |
1279 |
> |
yy_aconf->port |= OPER_FLAG_DIE; |
1280 |
> |
} | T_RESTART |
1281 |
> |
{ |
1282 |
> |
if (conf_parser_ctx.pass == 2) |
1283 |
> |
yy_aconf->port |= OPER_FLAG_RESTART; |
1284 |
|
} | REHASH |
1285 |
|
{ |
1286 |
|
if (conf_parser_ctx.pass == 2) |
1287 |
< |
{ |
1307 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_REHASH; |
1308 |
< |
else yy_aconf->port |= OPER_FLAG_REHASH; |
1309 |
< |
} |
1287 |
> |
yy_aconf->port |= OPER_FLAG_REHASH; |
1288 |
|
} | ADMIN |
1289 |
|
{ |
1290 |
|
if (conf_parser_ctx.pass == 2) |
1291 |
< |
{ |
1314 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_ADMIN; |
1315 |
< |
else yy_aconf->port |= OPER_FLAG_ADMIN; |
1316 |
< |
} |
1291 |
> |
yy_aconf->port |= OPER_FLAG_ADMIN; |
1292 |
|
} | HIDDEN_ADMIN |
1293 |
|
{ |
1294 |
|
if (conf_parser_ctx.pass == 2) |
1295 |
< |
{ |
1321 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_HIDDEN_ADMIN; |
1322 |
< |
else yy_aconf->port |= OPER_FLAG_HIDDEN_ADMIN; |
1323 |
< |
} |
1295 |
> |
yy_aconf->port |= OPER_FLAG_HIDDEN_ADMIN; |
1296 |
|
} | NICK_CHANGES |
1297 |
|
{ |
1298 |
|
if (conf_parser_ctx.pass == 2) |
1299 |
< |
{ |
1328 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_N; |
1329 |
< |
else yy_aconf->port |= OPER_FLAG_N; |
1330 |
< |
} |
1299 |
> |
yy_aconf->port |= OPER_FLAG_N; |
1300 |
|
} | T_OPERWALL |
1301 |
|
{ |
1302 |
|
if (conf_parser_ctx.pass == 2) |
1303 |
< |
{ |
1335 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_OPERWALL; |
1336 |
< |
else yy_aconf->port |= OPER_FLAG_OPERWALL; |
1337 |
< |
} |
1303 |
> |
yy_aconf->port |= OPER_FLAG_OPERWALL; |
1304 |
|
} | T_GLOBOPS |
1305 |
|
{ |
1306 |
|
if (conf_parser_ctx.pass == 2) |
1307 |
< |
{ |
1342 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_GLOBOPS; |
1343 |
< |
else yy_aconf->port |= OPER_FLAG_GLOBOPS; |
1344 |
< |
} |
1307 |
> |
yy_aconf->port |= OPER_FLAG_GLOBOPS; |
1308 |
|
} | OPER_SPY_T |
1309 |
|
{ |
1310 |
|
if (conf_parser_ctx.pass == 2) |
1311 |
< |
{ |
1349 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_OPER_SPY; |
1350 |
< |
else yy_aconf->port |= OPER_FLAG_OPER_SPY; |
1351 |
< |
} |
1311 |
> |
yy_aconf->port |= OPER_FLAG_OPER_SPY; |
1312 |
|
} | HIDDEN_OPER |
1313 |
|
{ |
1314 |
|
if (conf_parser_ctx.pass == 2) |
1315 |
< |
{ |
1356 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_HIDDEN_OPER; |
1357 |
< |
else yy_aconf->port |= OPER_FLAG_HIDDEN_OPER; |
1358 |
< |
} |
1315 |
> |
yy_aconf->port |= OPER_FLAG_HIDDEN_OPER; |
1316 |
|
} | REMOTEBAN |
1317 |
|
{ |
1318 |
|
if (conf_parser_ctx.pass == 2) |
1319 |
< |
{ |
1320 |
< |
if (not_atom) yy_aconf->port &= ~OPER_FLAG_REMOTEBAN; |
1364 |
< |
else yy_aconf->port |= OPER_FLAG_REMOTEBAN; |
1365 |
< |
} |
1366 |
< |
} | ENCRYPTED |
1319 |
> |
yy_aconf->port |= OPER_FLAG_REMOTEBAN; |
1320 |
> |
} | MODULE |
1321 |
|
{ |
1322 |
|
if (conf_parser_ctx.pass == 2) |
1323 |
< |
{ |
1370 |
< |
if (not_atom) ClearConfEncrypted(yy_aconf); |
1371 |
< |
else SetConfEncrypted(yy_aconf); |
1372 |
< |
} |
1323 |
> |
yy_aconf->port |= OPER_FLAG_MODULE; |
1324 |
|
}; |
1325 |
|
|
1326 |
|
|
1736 |
|
} '=' auth_flags_items ';'; |
1737 |
|
|
1738 |
|
auth_flags_items: auth_flags_items ',' auth_flags_item | auth_flags_item; |
1739 |
< |
auth_flags_item: NOT { not_atom = 1; } auth_flags_item_atom |
1789 |
< |
| { not_atom = 0; } auth_flags_item_atom; |
1790 |
< |
|
1791 |
< |
auth_flags_item_atom: SPOOF_NOTICE |
1739 |
> |
auth_flags_item: SPOOF_NOTICE |
1740 |
|
{ |
1741 |
|
if (conf_parser_ctx.pass == 2) |
1742 |
< |
{ |
1795 |
< |
if (not_atom) yy_aconf->flags &= ~CONF_FLAGS_SPOOF_NOTICE; |
1796 |
< |
else yy_aconf->flags |= CONF_FLAGS_SPOOF_NOTICE; |
1797 |
< |
} |
1742 |
> |
yy_aconf->flags |= CONF_FLAGS_SPOOF_NOTICE; |
1743 |
|
} | EXCEED_LIMIT |
1744 |
|
{ |
1745 |
|
if (conf_parser_ctx.pass == 2) |
1746 |
< |
{ |
1802 |
< |
if (not_atom) yy_aconf->flags &= ~CONF_FLAGS_NOLIMIT; |
1803 |
< |
else yy_aconf->flags |= CONF_FLAGS_NOLIMIT; |
1804 |
< |
} |
1746 |
> |
yy_aconf->flags |= CONF_FLAGS_NOLIMIT; |
1747 |
|
} | KLINE_EXEMPT |
1748 |
|
{ |
1749 |
|
if (conf_parser_ctx.pass == 2) |
1750 |
< |
{ |
1809 |
< |
if (not_atom) yy_aconf->flags &= ~CONF_FLAGS_EXEMPTKLINE; |
1810 |
< |
else yy_aconf->flags |= CONF_FLAGS_EXEMPTKLINE; |
1811 |
< |
} |
1750 |
> |
yy_aconf->flags |= CONF_FLAGS_EXEMPTKLINE; |
1751 |
|
} | NEED_IDENT |
1752 |
|
{ |
1753 |
|
if (conf_parser_ctx.pass == 2) |
1754 |
< |
{ |
1816 |
< |
if (not_atom) yy_aconf->flags &= ~CONF_FLAGS_NEED_IDENTD; |
1817 |
< |
else yy_aconf->flags |= CONF_FLAGS_NEED_IDENTD; |
1818 |
< |
} |
1754 |
> |
yy_aconf->flags |= CONF_FLAGS_NEED_IDENTD; |
1755 |
|
} | CAN_FLOOD |
1756 |
|
{ |
1757 |
|
if (conf_parser_ctx.pass == 2) |
1758 |
< |
{ |
1823 |
< |
if (not_atom) yy_aconf->flags &= ~CONF_FLAGS_CAN_FLOOD; |
1824 |
< |
else yy_aconf->flags |= CONF_FLAGS_CAN_FLOOD; |
1825 |
< |
} |
1758 |
> |
yy_aconf->flags |= CONF_FLAGS_CAN_FLOOD; |
1759 |
|
} | NO_TILDE |
1760 |
|
{ |
1761 |
|
if (conf_parser_ctx.pass == 2) |
1762 |
< |
{ |
1830 |
< |
if (not_atom) yy_aconf->flags &= ~CONF_FLAGS_NO_TILDE; |
1831 |
< |
else yy_aconf->flags |= CONF_FLAGS_NO_TILDE; |
1832 |
< |
} |
1762 |
> |
yy_aconf->flags |= CONF_FLAGS_NO_TILDE; |
1763 |
|
} | GLINE_EXEMPT |
1764 |
|
{ |
1765 |
|
if (conf_parser_ctx.pass == 2) |
1766 |
< |
{ |
1837 |
< |
if (not_atom) yy_aconf->flags &= ~CONF_FLAGS_EXEMPTGLINE; |
1838 |
< |
else yy_aconf->flags |= CONF_FLAGS_EXEMPTGLINE; |
1839 |
< |
} |
1766 |
> |
yy_aconf->flags |= CONF_FLAGS_EXEMPTGLINE; |
1767 |
|
} | RESV_EXEMPT |
1768 |
|
{ |
1769 |
|
if (conf_parser_ctx.pass == 2) |
1770 |
< |
{ |
1844 |
< |
if (not_atom) yy_aconf->flags &= ~CONF_FLAGS_EXEMPTRESV; |
1845 |
< |
else yy_aconf->flags |= CONF_FLAGS_EXEMPTRESV; |
1846 |
< |
} |
1770 |
> |
yy_aconf->flags |= CONF_FLAGS_EXEMPTRESV; |
1771 |
|
} | NEED_PASSWORD |
1772 |
|
{ |
1773 |
|
if (conf_parser_ctx.pass == 2) |
1774 |
< |
{ |
1851 |
< |
if (not_atom) yy_aconf->flags &= ~CONF_FLAGS_NEED_PASSWORD; |
1852 |
< |
else yy_aconf->flags |= CONF_FLAGS_NEED_PASSWORD; |
1853 |
< |
} |
1774 |
> |
yy_aconf->flags |= CONF_FLAGS_NEED_PASSWORD; |
1775 |
|
}; |
1776 |
|
|
1777 |
|
/* XXX - need check for illegal hostnames here */ |
2355 |
|
} '=' connect_flags_items ';'; |
2356 |
|
|
2357 |
|
connect_flags_items: connect_flags_items ',' connect_flags_item | connect_flags_item; |
2358 |
< |
connect_flags_item: NOT { not_atom = 1; } connect_flags_item_atom |
2438 |
< |
| { not_atom = 0; } connect_flags_item_atom; |
2439 |
< |
|
2440 |
< |
connect_flags_item_atom: COMPRESSED |
2358 |
> |
connect_flags_item: COMPRESSED |
2359 |
|
{ |
2360 |
|
if (conf_parser_ctx.pass == 2) |
2361 |
|
#ifndef HAVE_LIBZ |
2362 |
|
yyerror("Ignoring flags = compressed; -- no zlib support"); |
2363 |
|
#else |
2364 |
|
{ |
2365 |
< |
if (not_atom)ClearConfCompressed(yy_aconf); |
2448 |
< |
else SetConfCompressed(yy_aconf); |
2365 |
> |
SetConfCompressed(yy_aconf); |
2366 |
|
} |
2367 |
|
#endif |
2368 |
|
} | CRYPTLINK |
2369 |
|
{ |
2370 |
|
if (conf_parser_ctx.pass == 2) |
2371 |
< |
{ |
2455 |
< |
if (not_atom)ClearConfCryptLink(yy_aconf); |
2456 |
< |
else SetConfCryptLink(yy_aconf); |
2457 |
< |
} |
2371 |
> |
SetConfCryptLink(yy_aconf); |
2372 |
|
} | AUTOCONN |
2373 |
|
{ |
2374 |
|
if (conf_parser_ctx.pass == 2) |
2375 |
< |
{ |
2462 |
< |
if (not_atom)ClearConfAllowAutoConn(yy_aconf); |
2463 |
< |
else SetConfAllowAutoConn(yy_aconf); |
2464 |
< |
} |
2375 |
> |
SetConfAllowAutoConn(yy_aconf); |
2376 |
|
} | BURST_AWAY |
2377 |
|
{ |
2378 |
|
if (conf_parser_ctx.pass == 2) |
2379 |
< |
{ |
2469 |
< |
if (not_atom)ClearConfAwayBurst(yy_aconf); |
2470 |
< |
else SetConfAwayBurst(yy_aconf); |
2471 |
< |
} |
2379 |
> |
SetConfAwayBurst(yy_aconf); |
2380 |
|
} | TOPICBURST |
2381 |
|
{ |
2382 |
|
if (conf_parser_ctx.pass == 2) |
2383 |
< |
{ |
2384 |
< |
if (not_atom)ClearConfTopicBurst(yy_aconf); |
2477 |
< |
else SetConfTopicBurst(yy_aconf); |
2478 |
< |
} |
2479 |
< |
} |
2480 |
< |
; |
2383 |
> |
SetConfTopicBurst(yy_aconf); |
2384 |
> |
}; |
2385 |
|
|
2386 |
|
connect_rsa_public_key_file: RSA_PUBLIC_KEY_FILE '=' QSTRING ';' |
2387 |
|
{ |