}
if(client_p->localClient->F)
- comm_close(client_p->localClient->F->fd);
+ rb_close(client_p->localClient->F->fd);
if(client_p->localClient->passwd)
{
"No response from %s, closing link",
log_client_name(client_p, HIDE_IP));
}
- (void) ircsnprintf(scratch, sizeof(scratch),
+ (void) rb_snprintf(scratch, sizeof(scratch),
"Ping timeout: %d seconds",
(int) (CurrentTime - client_p->localClient->lasttime));
switch (showip)
{
case SHOW_IP:
- ircsnprintf(nbuf, sizeof(nbuf), "%s[%s@%s]",
+ rb_snprintf(nbuf, sizeof(nbuf), "%s[%s@%s]",
client->name, client->username,
client->sockhost);
break;
case MASK_IP:
- ircsnprintf(nbuf, sizeof(nbuf), "%s[%s@255.255.255.255]",
+ rb_snprintf(nbuf, sizeof(nbuf), "%s[%s@255.255.255.255]",
client->name, client->username);
break;
default:
- ircsnprintf(nbuf, sizeof(nbuf), "%s[%s@%s]",
+ rb_snprintf(nbuf, sizeof(nbuf), "%s[%s@%s]",
client->name, client->username, client->host);
}
return nbuf;
#ifdef HIDE_SERVERS_IPS
if(EmptyString(target_p->name))
{
- ircsnprintf(nbuf, sizeof(nbuf), "[%s@255.255.255.255]",
+ rb_snprintf(nbuf, sizeof(nbuf), "[%s@255.255.255.255]",
target_p->username);
return nbuf;
}
switch (showip)
{
case SHOW_IP:
- ircsnprintf(nbuf, sizeof(nbuf), "%s[%s@%s]",
+ rb_snprintf(nbuf, sizeof(nbuf), "%s[%s@%s]",
target_p->name, target_p->username,
target_p->sockhost);
break;
case MASK_IP:
- ircsnprintf(nbuf, sizeof(nbuf), "%s[%s@255.255.255.255]",
+ rb_snprintf(nbuf, sizeof(nbuf), "%s[%s@255.255.255.255]",
target_p->name, target_p->username);
default:
- ircsnprintf(nbuf, sizeof(nbuf), "%s[%s@%s]",
+ rb_snprintf(nbuf, sizeof(nbuf), "%s[%s@%s]",
target_p->name, target_p->username,
target_p->host);
}
switch (showip)
{
case SHOW_IP:
- ircsnprintf(nbuf, sizeof(nbuf), "%s[%s@%s]", target_p->name,
+ rb_snprintf(nbuf, sizeof(nbuf), "%s[%s@%s]", target_p->name,
target_p->username, target_p->sockhost);
break;
case MASK_IP:
- ircsnprintf(nbuf, sizeof(nbuf), "%s[%s@255.255.255.255]",
+ rb_snprintf(nbuf, sizeof(nbuf), "%s[%s@255.255.255.255]",
target_p->name, target_p->username);
default:
- ircsnprintf(nbuf, sizeof(nbuf), "%s[%s@%s]", target_p->name,
+ rb_snprintf(nbuf, sizeof(nbuf), "%s[%s@%s]", target_p->name,
target_p->username, target_p->host);
}
if(client_p->flags & FLAGS_SENDQEX)
strlcpy(abt->notice, "Max SendQ exceeded", sizeof(abt->notice));
else
- ircsnprintf(abt->notice, sizeof(abt->notice), "Write error: %s", strerror(errno));
+ rb_snprintf(abt->notice, sizeof(abt->notice), "Write error: %s", strerror(errno));
abt->client = client_p;
SetIOError(client_p);
strcat(comment1, source_p->name);
}
if (IsPerson(from))
- ircsnprintf(newcomment, sizeof(newcomment), "by %s: %s",
+ rb_snprintf(newcomment, sizeof(newcomment), "by %s: %s",
from->name, comment);
if(source_p->serv != NULL)
/* Always show source here, so the server notices show
* which side initiated the split -- jilles
*/
- ircsnprintf(newcomment, sizeof(newcomment), "by %s: %s",
+ rb_snprintf(newcomment, sizeof(newcomment), "by %s: %s",
from == source_p ? me.name : from->name, comment);
if (!IsIOError(source_p))
sendto_one(source_p, "SQUIT %s :%s", use_id(source_p),
if(!IsIOError(client_p))
send_queued_write(client_p->localClient->F->fd, client_p);
- comm_close(client_p->localClient->F->fd);
+ rb_close(client_p->localClient->F->fd);
client_p->localClient->F = NULL;
}
if(-1 < client_p->localClient->ctrlfd)
{
- comm_close(client_p->localClient->ctrlfd);
+ rb_close(client_p->localClient->ctrlfd);
client_p->localClient->ctrlfd = -1;
}
* for reading even though it ends up being an EOF. -avalon
*/
char errmsg[255];
- int current_error = comm_get_sockerr(client_p->localClient->F->fd);
+ int current_error = rb_get_sockerr(client_p->localClient->F->fd);
SetIOError(client_p);
if(error == 0)
strlcpy(errmsg, "Remote host closed the connection", sizeof(errmsg));
else
- ircsnprintf(errmsg, sizeof(errmsg), "Read error: %s", strerror(current_error));
+ rb_snprintf(errmsg, sizeof(errmsg), "Read error: %s", strerror(current_error));
exit_client(client_p, client_p, &me, errmsg);
}