Users having the user mode "c" set receive NOTICE messages on each
new client connection to the local server as well as disconnects.
Only IRC operators (users having the mode "o" set) are allowed to
set the 'c' user mode.
These connect/disconnect messages can be useful for open proxy
scanners -- BOPM (http://wiki.blitzed.org/BOPM) is now functional
with ngIRCd, for example.
"%s \"%s\" unregistered (connection %d): %s",
Client_TypeText(Client), Client_Mask(Client),
Client->conn_id, Txt);
"%s \"%s\" unregistered (connection %d): %s",
Client_TypeText(Client), Client_Mask(Client),
Client->conn_id, Txt);
+ Log_ServerNotice('c', "Client exiting: %s (%s@%s) [%s]",
+ Client_ID(Client), Client_User(Client),
+ Client_Hostname(Client), Txt);
if (SendQuit) {
/* Inforam all the other servers */
if (SendQuit) {
/* Inforam all the other servers */
#define RECONNECT_DELAY 3 /* Time to delay re-connect attempts
in seconds. */
#define RECONNECT_DELAY 3 /* Time to delay re-connect attempts
in seconds. */
-#define USERMODES "aiorsw" /* Supported user modes. */
+#define USERMODES "aciorsw" /* Supported user modes. */
#define CHANMODES "biIklmnoPstvz" /* Supported channel modes. */
#define CONNECTED true /* Internal status codes. */
#define CHANMODES "biIklmnoPstvz" /* Supported channel modes. */
#define CONNECTED true /* Internal status codes. */
Client_Modes(Client), Client_ID(From),
Client_ID(Client_Introducer(Client)),
Client_Hops(Client), Client_Hops(Client) > 1 ? "s": "");
Client_Modes(Client), Client_ID(From),
Client_ID(Client_Introducer(Client)),
Client_Hops(Client), Client_Hops(Client) > 1 ? "s": "");
Log(LOG_NOTICE, "%s \"%s\" registered (connection %d).",
Client_TypeText(Client), Client_Mask(Client),
Client_Conn(Client));
Log(LOG_NOTICE, "%s \"%s\" registered (connection %d).",
Client_TypeText(Client), Client_Mask(Client),
Client_Conn(Client));
+ Log_ServerNotice('c', "Client connecting: %s (%s@%s) [%s] - %s",
+ Client_ID(Client), Client_User(Client),
+ Client_Hostname(Client),
+ Conn_IPA(Client_Conn(Client)),
+ Client_TypeText(Client));
+ }
/* Inform other servers */
IRC_WriteStrServersPrefixFlag_CB(From,
/* Inform other servers */
IRC_WriteStrServersPrefixFlag_CB(From,
else ok = IRC_WriteStrClient( Origin, ERR_NOPRIVILEGES_MSG, Client_ID( Origin ));
break;
else ok = IRC_WriteStrClient( Origin, ERR_NOPRIVILEGES_MSG, Client_ID( Origin ));
break;
+ case 'c': /* Receive connect notices
+ * (only settable by IRC operators!) */
+ if(!set || Client_OperByMe(Origin)
+ || Client_Type(Client) == CLIENT_SERVER)
+ x[0] = 'c';
+ else
+ ok = IRC_WriteStrClient(Origin,
+ ERR_NOPRIVILEGES_MSG,
+ Client_ID(Origin));
+ break;
case 'o': /* IRC operator (only unsettable!) */
if(( ! set ) || ( Client_Type( Client ) == CLIENT_SERVER ))
{
case 'o': /* IRC operator (only unsettable!) */
if(( ! set ) || ( Client_Type( Client ) == CLIENT_SERVER ))
{