Merge pull request #217 from SaberUK/master+notice-auth
Use "NOTICE *" before registration instead of "NOTICE AUTH".
This commit is contained in:
commit
64c265cf33
|
@ -193,9 +193,9 @@
|
||||||
;MorePrivacy = no
|
;MorePrivacy = no
|
||||||
|
|
||||||
# Normally ngIRCd doesn't send any messages to a client until it is
|
# Normally ngIRCd doesn't send any messages to a client until it is
|
||||||
# registered. Enable this option to let the daemon send "NOTICE AUTH"
|
# registered. Enable this option to let the daemon send "NOTICE *"
|
||||||
# messages to clients while connecting.
|
# messages to clients while connecting.
|
||||||
;NoticeAuth = no
|
;NoticeBeforeRegistration = no
|
||||||
|
|
||||||
# Should IRC Operators be allowed to use the MODE command even if
|
# Should IRC Operators be allowed to use the MODE command even if
|
||||||
# they are not(!) channel-operators?
|
# they are not(!) channel-operators?
|
||||||
|
|
|
@ -299,9 +299,9 @@ anonymizing software such as TOR or I2P and one does not wish to make it
|
||||||
too easy to collect statistics on the users.
|
too easy to collect statistics on the users.
|
||||||
Default: no.
|
Default: no.
|
||||||
.TP
|
.TP
|
||||||
\fBNoticeAuth\fR (boolean)
|
\fBNoticeBeforeRegistration\fR (boolean)
|
||||||
Normally ngIRCd doesn't send any messages to a client until it is registered.
|
Normally ngIRCd doesn't send any messages to a client until it is registered.
|
||||||
Enable this option to let the daemon send "NOTICE AUTH" messages to clients
|
Enable this option to let the daemon send "NOTICE *" messages to clients
|
||||||
while connecting. Default: no.
|
while connecting. Default: no.
|
||||||
.TP
|
.TP
|
||||||
\fBOperCanUseMode\fR (boolean)
|
\fBOperCanUseMode\fR (boolean)
|
||||||
|
|
|
@ -412,7 +412,7 @@ Conf_Test( void )
|
||||||
#endif
|
#endif
|
||||||
printf(" IncludeDir = %s\n", Conf_IncludeDir);
|
printf(" IncludeDir = %s\n", Conf_IncludeDir);
|
||||||
printf(" MorePrivacy = %s\n", yesno_to_str(Conf_MorePrivacy));
|
printf(" MorePrivacy = %s\n", yesno_to_str(Conf_MorePrivacy));
|
||||||
printf(" NoticeAuth = %s\n", yesno_to_str(Conf_NoticeAuth));
|
printf(" NoticeBeforeRegistration = %s\n", yesno_to_str(Conf_NoticeBeforeRegistration));
|
||||||
printf(" OperCanUseMode = %s\n", yesno_to_str(Conf_OperCanMode));
|
printf(" OperCanUseMode = %s\n", yesno_to_str(Conf_OperCanMode));
|
||||||
printf(" OperChanPAutoOp = %s\n", yesno_to_str(Conf_OperChanPAutoOp));
|
printf(" OperChanPAutoOp = %s\n", yesno_to_str(Conf_OperChanPAutoOp));
|
||||||
printf(" OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
|
printf(" OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
|
||||||
|
@ -797,7 +797,7 @@ Set_Defaults(bool InitServers)
|
||||||
#endif
|
#endif
|
||||||
strcpy(Conf_IncludeDir, "");
|
strcpy(Conf_IncludeDir, "");
|
||||||
Conf_MorePrivacy = false;
|
Conf_MorePrivacy = false;
|
||||||
Conf_NoticeAuth = false;
|
Conf_NoticeBeforeRegistration = false;
|
||||||
Conf_OperCanMode = false;
|
Conf_OperCanMode = false;
|
||||||
Conf_OperChanPAutoOp = true;
|
Conf_OperChanPAutoOp = true;
|
||||||
Conf_OperServerMode = false;
|
Conf_OperServerMode = false;
|
||||||
|
@ -1796,8 +1796,8 @@ Handle_OPTIONS(const char *File, int Line, char *Var, char *Arg)
|
||||||
Conf_MorePrivacy = Check_ArgIsTrue(Arg);
|
Conf_MorePrivacy = Check_ArgIsTrue(Arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strcasecmp(Var, "NoticeAuth") == 0) {
|
if (strcasecmp(Var, "NoticeBeforeRegistration") == 0 || strcasecmp(Var, "NoticeAuth") == 0) {
|
||||||
Conf_NoticeAuth = Check_ArgIsTrue(Arg);
|
Conf_NoticeBeforeRegistration = Check_ArgIsTrue(Arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strcasecmp(Var, "OperCanUseMode") == 0) {
|
if (strcasecmp(Var, "OperCanUseMode") == 0) {
|
||||||
|
|
|
@ -194,8 +194,8 @@ GLOBAL bool Conf_Ident;
|
||||||
/** Enable "more privacy" mode and "censor" some user-related information */
|
/** Enable "more privacy" mode and "censor" some user-related information */
|
||||||
GLOBAL bool Conf_MorePrivacy;
|
GLOBAL bool Conf_MorePrivacy;
|
||||||
|
|
||||||
/** Enable NOTICE AUTH messages on connect */
|
/** Enable "NOTICE *" messages on connect */
|
||||||
GLOBAL bool Conf_NoticeAuth;
|
GLOBAL bool Conf_NoticeBeforeRegistration;
|
||||||
|
|
||||||
/** Enable all usage of PAM, even when compiled with support for it */
|
/** Enable all usage of PAM, even when compiled with support for it */
|
||||||
GLOBAL bool Conf_PAM;
|
GLOBAL bool Conf_PAM;
|
||||||
|
|
|
@ -1487,16 +1487,16 @@ Conn_StartLogin(CONN_ID Idx)
|
||||||
ident_sock = My_Connections[Idx].sock;
|
ident_sock = My_Connections[Idx].sock;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (Conf_NoticeAuth) {
|
if (Conf_NoticeBeforeRegistration) {
|
||||||
/* Send "NOTICE AUTH" messages to the client */
|
/* Send "NOTICE *" messages to the client */
|
||||||
#ifdef IDENTAUTH
|
#ifdef IDENTAUTH
|
||||||
if (Conf_Ident)
|
if (Conf_Ident)
|
||||||
(void)Conn_WriteStr(Idx,
|
(void)Conn_WriteStr(Idx,
|
||||||
"NOTICE AUTH :*** Looking up your hostname and checking ident");
|
"NOTICE * :*** Looking up your hostname and checking ident");
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
(void)Conn_WriteStr(Idx,
|
(void)Conn_WriteStr(Idx,
|
||||||
"NOTICE AUTH :*** Looking up your hostname");
|
"NOTICE * :*** Looking up your hostname");
|
||||||
/* Send buffered data to the client, but break on errors
|
/* Send buffered data to the client, but break on errors
|
||||||
* because Handle_Write() would have closed the connection
|
* because Handle_Write() would have closed the connection
|
||||||
* again in this case! */
|
* again in this case! */
|
||||||
|
@ -2265,9 +2265,9 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
|
||||||
strlcpy(My_Connections[i].host, readbuf,
|
strlcpy(My_Connections[i].host, readbuf,
|
||||||
sizeof(My_Connections[i].host));
|
sizeof(My_Connections[i].host));
|
||||||
Client_SetHostname(c, readbuf);
|
Client_SetHostname(c, readbuf);
|
||||||
if (Conf_NoticeAuth)
|
if (Conf_NoticeBeforeRegistration)
|
||||||
(void)Conn_WriteStr(i,
|
(void)Conn_WriteStr(i,
|
||||||
"NOTICE AUTH :*** Found your hostname: %s",
|
"NOTICE * :*** Found your hostname: %s",
|
||||||
My_Connections[i].host);
|
My_Connections[i].host);
|
||||||
#ifdef IDENTAUTH
|
#ifdef IDENTAUTH
|
||||||
++identptr;
|
++identptr;
|
||||||
|
@ -2291,22 +2291,22 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
|
||||||
i, identptr);
|
i, identptr);
|
||||||
Client_SetUser(c, identptr, true);
|
Client_SetUser(c, identptr, true);
|
||||||
}
|
}
|
||||||
if (Conf_NoticeAuth) {
|
if (Conf_NoticeBeforeRegistration) {
|
||||||
(void)Conn_WriteStr(i,
|
(void)Conn_WriteStr(i,
|
||||||
"NOTICE AUTH :*** Got %sident response%s%s",
|
"NOTICE * :*** Got %sident response%s%s",
|
||||||
*ptr ? "invalid " : "",
|
*ptr ? "invalid " : "",
|
||||||
*ptr ? "" : ": ",
|
*ptr ? "" : ": ",
|
||||||
*ptr ? "" : identptr);
|
*ptr ? "" : identptr);
|
||||||
}
|
}
|
||||||
} else if(Conf_Ident) {
|
} else if(Conf_Ident) {
|
||||||
Log(LOG_INFO, "IDENT lookup for connection %d: no result.", i);
|
Log(LOG_INFO, "IDENT lookup for connection %d: no result.", i);
|
||||||
if (Conf_NoticeAuth)
|
if (Conf_NoticeBeforeRegistration)
|
||||||
(void)Conn_WriteStr(i,
|
(void)Conn_WriteStr(i,
|
||||||
"NOTICE AUTH :*** No ident response");
|
"NOTICE * :*** No ident response");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (Conf_NoticeAuth) {
|
if (Conf_NoticeBeforeRegistration) {
|
||||||
/* Send buffered data to the client, but break on
|
/* Send buffered data to the client, but break on
|
||||||
* errors because Handle_Write() would have closed
|
* errors because Handle_Write() would have closed
|
||||||
* the connection again in this case! */
|
* the connection again in this case! */
|
||||||
|
|
Loading…
Reference in New Issue