const char *hostname = IRCDHOSTNAME;
void sendbuf(struct client_data *client) {
- fprintf(stderr, "SERVER %"PRISocket": %.*s", client->FD, (int)databuf.len, (char*)databuf.buf);
+ fprintf(stderr, "SERVER %" PRISocket ": %.*s", client->FD, (int)databuf.len, (char*)databuf.buf);
sendClient(client, databuf.buf, databuf.len);
}
static void chanlog_time(time_t timestamp) {
if (end > p && end[-1] == '\r')
*--end = '\n';
if (memchr(p, '\0', end-p)) {
- fprintf(stderr, "Client %"PRISocket" sent a NULL\n", client->FD);
+ fprintf(stderr, "Client %" PRISocket " sent a NULL\n", client->FD);
killConnection(client, 0);
return 1; // null detected
}
if (memchr(p, '\r', end-p)) {
- fprintf(stderr, "Client %"PRISocket" sent an extra CR\n", client->FD);
+ fprintf(stderr, "Client %" PRISocket " sent an extra CR\n", client->FD);
killConnection(client, 0);
return 1; // internal \r detected
}
}
args[argc] = NULL;
}
- fprintf(stderr, "parsed %"PRISocket": %s", client->FD, command);
+ fprintf(stderr, "parsed %" PRISocket ": %s", client->FD, command);
if (strcmp(command, "PASS") != 0 && strcmp(command, "OPER") != 0 && strcmp(command, "NEWACC") != 0
&& strcmp(command, "AUTHENTICATE") != 0 && strcmp(command, "WEBIRC") != 0) {
for (int i = 0; i < argc; i++){
#ifdef HAS_TLS
// TODO: move this when we add sasl
if (client->cctx && tls_peer_cert_provided(client->cctx))
- fprintf(stderr, "CertFP %"PRISocket": %s\n", client->FD, tls_peer_cert_hash(client->cctx));
+ fprintf(stderr, "CertFP %" PRISocket ": %s\n", client->FD, tls_peer_cert_hash(client->cctx));
#endif
rpl_welcome(client), sendbuf(client);
rpl_yourhost(client), sendbuf(client);
case '+': is_plus = 1; break;
case '-': is_plus = 0; break;
#define MSG_CHANDMODE(m) \
- copy_strf(&databuf, ":%s!%s@%s MODE %s %s"m"\r\n", \
+ copy_strf(&databuf, ":%s!%s@%s MODE %s %s" m "\r\n", \
n, u, h, chan->name, is_plus?"+":"-")
case 'P':
if (client && !(client->umode & UMODE_OPER))
cl->dying = 1;
job_kill(cl);
if (cl->peername)
- fprintf(stderr, "Client disconnected from Socket: %"PRISocket", IP: %s PORT: %d\n", cl->FD, cl->peername, cl->peerport);
+ fprintf(stderr, "Client disconnected from Socket: %" PRISocket ", IP: %s PORT: %d\n", cl->FD, cl->peername, cl->peerport);
if (!byChoice && cl->nick && cl->username) {
msg_quit(cl, "", "Has left the building (Forced)");
sendbuf_visible(cl);
return;
}
if (rv == -1) {
- fprintf(stderr, "tls_close (%"PRISocket"): %s\n", cl->FD, tls_error(cl->cctx));
+ fprintf(stderr, "tls_close (%" PRISocket "): %s\n", cl->FD, tls_error(cl->cctx));
}
tls_free(cl->cctx);
cl->cctx = NULL;