array_bytes(&My_ConnArray));
assert(array_length(&My_ConnArray, sizeof(CONNECTION)) >= (size_t)Pool_Size);
-
+
array_free( &My_Listeners );
for (i = 0; i < Pool_Size; i++)
GLOBAL bool
Conn_WriteStr(CONN_ID Idx, const char *Format, ...)
#else
-GLOBAL bool
+GLOBAL bool
Conn_WriteStr(Idx, Format, va_alist)
CONN_ID Idx;
const char *Format;
* IRC_WriteXXX() functions when the prefix of this server had
* to be added to an already "quite long" command line which
* has been received from a regular IRC client, for example.
- *
+ *
* We are not allowed to send such "oversized" messages to
* other servers and clients, see RFC 2812 2.3 and 2813 3.3
* ("these messages SHALL NOT exceed 512 characters in length,
ident_sock = My_Connections[Idx].sock;
#endif
- if (Conf_NoticeAuth) {
+ if (Conf_NoticeBeforeRegistration) {
/* Send "NOTICE *" messages to the client */
#ifdef IDENTAUTH
if (Conf_Ident)
if (len == 0) {
LogDebug("Client \"%s:%u\" is closing connection %d ...",
My_Connections[Idx].host,
- ng_ipaddr_tostr(&My_Connections[Idx].addr), Idx);
+ ng_ipaddr_getport(&My_Connections[Idx].addr), Idx);
Conn_Close(Idx, NULL, "Client closed connection", false);
return;
}
strlcpy(My_Connections[i].host, readbuf,
sizeof(My_Connections[i].host));
Client_SetHostname(c, readbuf);
- if (Conf_NoticeAuth)
+ if (Conf_NoticeBeforeRegistration)
(void)Conn_WriteStr(i,
"NOTICE * :*** Found your hostname: %s",
My_Connections[i].host);
i, identptr);
Client_SetUser(c, identptr, true);
}
- if (Conf_NoticeAuth) {
+ if (Conf_NoticeBeforeRegistration) {
(void)Conn_WriteStr(i,
"NOTICE * :*** Got %sident response%s%s",
*ptr ? "invalid " : "",
}
} else if(Conf_Ident) {
Log(LOG_INFO, "IDENT lookup for connection %d: no result.", i);
- if (Conf_NoticeAuth)
+ if (Conf_NoticeBeforeRegistration)
(void)Conn_WriteStr(i,
"NOTICE * :*** No ident response");
}
#endif
- if (Conf_NoticeAuth) {
+ if (Conf_NoticeBeforeRegistration) {
/* Send buffered data to the client, but break on
* errors because Handle_Write() would have closed
* the connection again in this case! */
* @returns Pointer to CLIENT structure.
*/
GLOBAL CLIENT *
-Conn_GetClient( CONN_ID Idx )
+Conn_GetClient( CONN_ID Idx )
{
CONNECTION *c;