Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ircd/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ struct Ban *find_ban(struct Client *cptr, struct Ban *banlist, int extbantype, i
if (IsAccount(cptr) && ((feature_int(FEAT_HOST_HIDING_STYLE) == 1) ||
(feature_int(FEAT_HOST_HIDING_STYLE) == 3)))
{
ircd_snprintf(0, tmphost, HOSTLEN, "%s.%s",
ircd_snprintf(0, tmphost, HOSTLEN + 1, "%s.%s",
cli_user(cptr)->account, (feature_bool(FEAT_OPERHOST_HIDING) &&
IsAnOper(cptr) ? feature_str(FEAT_HIDDEN_OPERHOST) :
feature_str(FEAT_HIDDEN_HOST)));
Expand Down
10 changes: 5 additions & 5 deletions ircd/m_userip.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ static void userip_formatter(struct Client* cptr, struct Client *sptr, struct Ms
assert(IsUser(cptr));

if ((sptr == cptr) || IsAnOper(sptr) || !IsHiddenHost(cptr))
ircd_snprintf(0, iphost, HOSTLEN, "%s", ircd_ntoa(&cli_ip(cptr)));
ircd_snprintf(0, iphost, HOSTLEN + 1, "%s", ircd_ntoa(&cli_ip(cptr)));
else if (IsCloakIP(cptr))
ircd_snprintf(0, iphost, HOSTLEN, "%s", cli_user(cptr)->cloakip);
ircd_snprintf(0, iphost, HOSTLEN + 1, "%s", cli_user(cptr)->cloakip);
else if (IsFakeHost(cptr) || IsSetHost(cptr))
ircd_snprintf(0, iphost, HOSTLEN, "%s", feature_str(FEAT_HIDDEN_IP));
ircd_snprintf(0, iphost, HOSTLEN + 1, "%s", feature_str(FEAT_HIDDEN_IP));
else if (((feature_int(FEAT_HOST_HIDING_STYLE) == 1) ||
(feature_int(FEAT_HOST_HIDING_STYLE) == 3)) && IsAccount(cptr))
ircd_snprintf(0, iphost, HOSTLEN, "%s", feature_str(FEAT_HIDDEN_IP));
ircd_snprintf(0, iphost, HOSTLEN + 1, "%s", feature_str(FEAT_HIDDEN_IP));
else
ircd_snprintf(0, iphost, HOSTLEN, "%s", ircd_ntoa(&cli_ip(cptr)));
ircd_snprintf(0, iphost, HOSTLEN + 1, "%s", ircd_ntoa(&cli_ip(cptr)));

msgq_append(0, mb, "%s%s=%c%s@%s", cli_name(cptr),
SeeOper(sptr,cptr) ? "*" : "",
Expand Down
10 changes: 6 additions & 4 deletions ircd/s_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,10 +1161,10 @@ hide_hostmask(struct Client *cptr)
} else if ((feature_int(FEAT_HOST_HIDING_STYLE) == 1) ||
((feature_int(FEAT_HOST_HIDING_STYLE) == 3) && IsAccount(cptr))) {
if (IsAnOper(cptr) && !IsHideOper(cptr) && feature_bool(FEAT_OPERHOST_HIDING))
ircd_snprintf(0, newhost, HOSTLEN, "%s.%s",
ircd_snprintf(0, newhost, HOSTLEN + 1, "%s.%s",
cli_user(cptr)->account, feature_str(FEAT_HIDDEN_OPERHOST));
else
ircd_snprintf(0, newhost, HOSTLEN, "%s.%s",
ircd_snprintf(0, newhost, HOSTLEN + 1, "%s.%s",
cli_user(cptr)->account, feature_str(FEAT_HIDDEN_HOST));
} else if (IsCloakHost(cptr) && ((feature_int(FEAT_HOST_HIDING_STYLE) == 2) ||
(feature_int(FEAT_HOST_HIDING_STYLE) == 3))) {
Expand Down Expand Up @@ -1753,10 +1753,12 @@ int set_user_mode(struct Client *cptr, struct Client *sptr, int parc,
* will cause servers to update correctly.
*/
if (!FlagHas(&setflags, FLAG_ACCOUNT) && IsAccount(acptr)) {
int len = ACCOUNTLEN;
int len = ACCOUNTLEN + 1;
char *ts;
if ((ts = strchr(account, ':'))) {
len = (ts++) - account;
len = (ts++) - account + 1; /* +1: ircd_strncpy copies len-1 chars */
if (len > ACCOUNTLEN + 1)
len = ACCOUNTLEN + 1;
cli_user(acptr)->acc_create = atoi(ts);
Debug((DEBUG_DEBUG, "Received timestamped account in user mode; "
"account \"%s\", timestamp %Tu", account,
Expand Down