| 263 |
|
%token REASON |
| 264 |
|
%token REDIRPORT |
| 265 |
|
%token REDIRSERV |
| 266 |
– |
%token REGEX_T |
| 266 |
|
%token REHASH |
| 267 |
|
%token REMOTE |
| 268 |
|
%token REMOTEBAN |
| 2160 |
|
!block_state.host.buf[0]) |
| 2161 |
|
break; |
| 2162 |
|
|
| 2163 |
+ |
conf = conf_make(CONF_KLINE); |
| 2164 |
+ |
conf->user = xstrdup(block_state.user.buf); |
| 2165 |
+ |
conf->host = xstrdup(block_state.host.buf); |
| 2166 |
|
|
| 2167 |
< |
if (block_state.port.value == 1) |
| 2168 |
< |
{ |
| 2167 |
< |
#ifdef HAVE_LIBPCRE |
| 2168 |
< |
void *exp_user = NULL; |
| 2169 |
< |
void *exp_host = NULL; |
| 2170 |
< |
const char *errptr = NULL; |
| 2171 |
< |
|
| 2172 |
< |
if (!(exp_user = ircd_pcre_compile(block_state.user.buf, &errptr)) || |
| 2173 |
< |
!(exp_host = ircd_pcre_compile(block_state.host.buf, &errptr))) |
| 2174 |
< |
{ |
| 2175 |
< |
ilog(LOG_TYPE_IRCD, "Failed to add regular expression based K-Line: %s", |
| 2176 |
< |
errptr); |
| 2177 |
< |
break; |
| 2178 |
< |
} |
| 2179 |
< |
|
| 2180 |
< |
conf = conf_make(CONF_RKLINE); |
| 2181 |
< |
conf->regexuser = exp_user; |
| 2182 |
< |
conf->regexhost = exp_host; |
| 2183 |
< |
|
| 2184 |
< |
conf->user = xstrdup(block_state.user.buf); |
| 2185 |
< |
conf->host = xstrdup(block_state.host.buf); |
| 2186 |
< |
|
| 2187 |
< |
if (block_state.rpass.buf[0]) |
| 2188 |
< |
conf->reason = xstrdup(block_state.rpass.buf); |
| 2189 |
< |
else |
| 2190 |
< |
conf->reason = xstrdup(CONF_NOREASON); |
| 2191 |
< |
#else |
| 2192 |
< |
ilog(LOG_TYPE_IRCD, "Failed to add regular expression based K-Line: no PCRE support"); |
| 2193 |
< |
break; |
| 2194 |
< |
#endif |
| 2195 |
< |
} |
| 2167 |
> |
if (block_state.rpass.buf[0]) |
| 2168 |
> |
conf->reason = xstrdup(block_state.rpass.buf); |
| 2169 |
|
else |
| 2170 |
< |
{ |
| 2171 |
< |
conf = conf_make(CONF_KLINE); |
| 2199 |
< |
|
| 2200 |
< |
conf->user = xstrdup(block_state.user.buf); |
| 2201 |
< |
conf->host = xstrdup(block_state.host.buf); |
| 2202 |
< |
|
| 2203 |
< |
if (block_state.rpass.buf[0]) |
| 2204 |
< |
conf->reason = xstrdup(block_state.rpass.buf); |
| 2205 |
< |
else |
| 2206 |
< |
conf->reason = xstrdup(CONF_NOREASON); |
| 2207 |
< |
add_conf_by_address(CONF_KLINE, conf); |
| 2208 |
< |
} |
| 2170 |
> |
conf->reason = xstrdup(CONF_NOREASON); |
| 2171 |
> |
add_conf_by_address(CONF_KLINE, conf); |
| 2172 |
|
}; |
| 2173 |
|
|
| 2211 |
– |
kill_type: TYPE |
| 2212 |
– |
{ |
| 2213 |
– |
if (conf_parser_ctx.pass == 2) |
| 2214 |
– |
block_state.port.value = 0; |
| 2215 |
– |
} '=' kill_type_items ';'; |
| 2216 |
– |
|
| 2217 |
– |
kill_type_items: kill_type_items ',' kill_type_item | kill_type_item; |
| 2218 |
– |
kill_type_item: REGEX_T |
| 2219 |
– |
{ |
| 2220 |
– |
if (conf_parser_ctx.pass == 2) |
| 2221 |
– |
block_state.port.value = 1; |
| 2222 |
– |
}; |
| 2223 |
– |
|
| 2174 |
|
kill_items: kill_items kill_item | kill_item; |
| 2175 |
< |
kill_item: kill_user | kill_reason | kill_type | error; |
| 2175 |
> |
kill_item: kill_user | kill_reason | error; |
| 2176 |
|
|
| 2177 |
|
kill_user: USER '=' QSTRING ';' |
| 2178 |
|
{ |
| 2284 |
|
if (!block_state.name.buf[0]) |
| 2285 |
|
break; |
| 2286 |
|
|
| 2287 |
< |
if (block_state.port.value == 1) |
| 2338 |
< |
{ |
| 2339 |
< |
#ifdef HAVE_LIBPCRE |
| 2340 |
< |
void *exp_p = NULL; |
| 2341 |
< |
const char *errptr = NULL; |
| 2342 |
< |
|
| 2343 |
< |
if (!(exp_p = ircd_pcre_compile(block_state.name.buf, &errptr))) |
| 2344 |
< |
{ |
| 2345 |
< |
ilog(LOG_TYPE_IRCD, "Failed to add regular expression based X-Line: %s", |
| 2346 |
< |
errptr); |
| 2347 |
< |
break; |
| 2348 |
< |
} |
| 2349 |
< |
|
| 2350 |
< |
conf = conf_make(CONF_RXLINE); |
| 2351 |
< |
conf->regexuser = exp_p; |
| 2352 |
< |
#else |
| 2353 |
< |
conf_error_report("Failed to add regular expression based X-Line: no PCRE support"); |
| 2354 |
< |
break; |
| 2355 |
< |
#endif |
| 2356 |
< |
} |
| 2357 |
< |
else |
| 2358 |
< |
conf = conf_make(CONF_XLINE); |
| 2359 |
< |
|
| 2287 |
> |
conf = conf_make(CONF_XLINE); |
| 2288 |
|
conf->name = xstrdup(block_state.name.buf); |
| 2289 |
|
|
| 2290 |
|
if (block_state.rpass.buf[0]) |
| 2293 |
|
conf->reason = xstrdup(CONF_NOREASON); |
| 2294 |
|
}; |
| 2295 |
|
|
| 2368 |
– |
gecos_flags: TYPE |
| 2369 |
– |
{ |
| 2370 |
– |
if (conf_parser_ctx.pass == 2) |
| 2371 |
– |
block_state.port.value = 0; |
| 2372 |
– |
} '=' gecos_flags_items ';'; |
| 2373 |
– |
|
| 2374 |
– |
gecos_flags_items: gecos_flags_items ',' gecos_flags_item | gecos_flags_item; |
| 2375 |
– |
gecos_flags_item: REGEX_T |
| 2376 |
– |
{ |
| 2377 |
– |
if (conf_parser_ctx.pass == 2) |
| 2378 |
– |
block_state.port.value = 1; |
| 2379 |
– |
}; |
| 2380 |
– |
|
| 2296 |
|
gecos_items: gecos_items gecos_item | gecos_item; |
| 2297 |
< |
gecos_item: gecos_name | gecos_reason | gecos_flags | error; |
| 2297 |
> |
gecos_item: gecos_name | gecos_reason | error; |
| 2298 |
|
|
| 2299 |
|
gecos_name: NAME '=' QSTRING ';' |
| 2300 |
|
{ |