2365 |
|
struct AccessItem *aconf; |
2366 |
|
|
2367 |
|
/* +5 for !,@,{,} and null */ |
2368 |
< |
static char buffer[NICKLEN+USERLEN+HOSTLEN+HOSTLEN+5]; |
2368 |
> |
static char buffer[NICKLEN + USERLEN + HOSTLEN + HOSTLEN + 5]; |
2369 |
|
|
2370 |
|
if (MyConnect(client_p)) |
2371 |
|
{ |
2376 |
|
|
2377 |
|
if (IsConfOperator(aconf)) |
2378 |
|
{ |
2379 |
< |
ircsprintf(buffer, "%s!%s@%s{%s}", client_p->name, |
2380 |
< |
client_p->username, client_p->host, |
2381 |
< |
conf->name); |
2379 |
> |
snprintf(buffer, sizeof(buffer), "%s!%s@%s{%s}", client_p->name, |
2380 |
> |
client_p->username, client_p->host, conf->name); |
2381 |
|
return buffer; |
2382 |
|
} |
2383 |
|
} |
2388 |
|
assert(0); /* Oper without oper conf! */ |
2389 |
|
} |
2390 |
|
|
2391 |
< |
ircsprintf(buffer, "%s!%s@%s{%s}", client_p->name, |
2392 |
< |
client_p->username, client_p->host, client_p->servptr->name); |
2391 |
> |
snprintf(buffer, sizeof(buffer), "%s!%s@%s{%s}", client_p->name, |
2392 |
> |
client_p->username, client_p->host, client_p->servptr->name); |
2393 |
|
return buffer; |
2394 |
|
} |
2395 |
|
|
2441 |
|
fbclose(conf_parser_ctx.conf_file); |
2442 |
|
|
2443 |
|
add_isupport("NETWORK", ServerInfo.network_name, -1); |
2444 |
< |
ircsprintf(chanmodes, "b%s%s:%d", ConfigChannel.use_except ? "e" : "", |
2445 |
< |
ConfigChannel.use_invex ? "I" : "", ConfigChannel.max_bans); |
2444 |
> |
snprintf(chanmodes, sizeof(chanmodes), "b%s%s:%d", |
2445 |
> |
ConfigChannel.use_except ? "e" : "", |
2446 |
> |
ConfigChannel.use_invex ? "I" : "", ConfigChannel.max_bans); |
2447 |
|
add_isupport("MAXLIST", chanmodes, -1); |
2448 |
|
add_isupport("MAXTARGETS", NULL, ConfigFileEntry.max_targets); |
2449 |
+ |
|
2450 |
|
if (ConfigChannel.disable_local_channels) |
2451 |
|
add_isupport("CHANTYPES", "#", -1); |
2452 |
|
else |
2453 |
|
add_isupport("CHANTYPES", "#&", -1); |
2454 |
< |
ircsprintf(chanlimit, "%s:%d", ConfigChannel.disable_local_channels ? "#" : "#&", |
2455 |
< |
ConfigChannel.max_chans_per_user); |
2454 |
> |
|
2455 |
> |
snprintf(chanlimit, sizeof(chanlimit), "%s:%d", |
2456 |
> |
ConfigChannel.disable_local_channels ? "#" : "#&", |
2457 |
> |
ConfigChannel.max_chans_per_user); |
2458 |
|
add_isupport("CHANLIMIT", chanlimit, -1); |
2459 |
< |
ircsprintf(chanmodes, "%s%s%s", ConfigChannel.use_except ? "e" : "", |
2460 |
< |
ConfigChannel.use_invex ? "I" : "", "b,k,l,imnpst"); |
2459 |
> |
snprintf(chanmodes, sizeof(chanmodes), "%s%s%s", |
2460 |
> |
ConfigChannel.use_except ? "e" : "", |
2461 |
> |
ConfigChannel.use_invex ? "I" : "", "b,k,l,imnpst"); |
2462 |
|
add_isupport("CHANNELLEN", NULL, LOCAL_CHANNELLEN); |
2463 |
+ |
|
2464 |
|
if (ConfigChannel.use_except) |
2465 |
|
add_isupport("EXCEPTS", "e", -1); |
2466 |
|
if (ConfigChannel.use_invex) |