summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/reference.conf4
-rw-r--r--include/client.h2
-rw-r--r--src/client.c5
-rw-r--r--src/conf_lexer.l1
-rw-r--r--src/conf_parser.y11
-rw-r--r--src/s_user.c9
6 files changed, 30 insertions, 2 deletions
diff --git a/doc/reference.conf b/doc/reference.conf
index 623035a..da977bf 100644
--- a/doc/reference.conf
+++ b/doc/reference.conf
@@ -452,6 +452,7 @@ operator {
* +D - deaf - Don't receive channel messages
* +d - debug - See debugging notices
* +e - external - See remote server connection and split notices
+ * +F - farconnect - Remote client connection/quit notices
* +f - full - See auth{} block full notices
* +G - softcallerid - Server Side Ignore for users not on your channels
* +g - callerid - Server Side Ignore (for privmsgs etc)
@@ -1113,6 +1114,7 @@ general {
* +D - deaf - Don't receive channel messages
* +d - debug - See debugging notices
* +e - external - See remote server connection and split notices
+ * +F - farconnect - Remote client connection/quit notices
* +f - full - See auth{} block full notices
* +G - softcallerid - Server Side Ignore for users not on your channels
* +g - callerid - Server Side Ignore (for privmsgs etc)
@@ -1134,7 +1136,7 @@ general {
/* oper_only_umodes: usermodes only opers may set */
oper_only_umodes = bots, cconn, cconn_full, debug, full, hidden, skill,
nchange, rej, spy, external, operwall,
- locops, unauth;
+ locops, unauth, farconnect;
/* oper_umodes: default usermodes opers get when they /oper */
oper_umodes = bots, locops, servnotice, operwall, wallop;
diff --git a/include/client.h b/include/client.h
index 940bbdf..063003a 100644
--- a/include/client.h
+++ b/include/client.h
@@ -158,6 +158,8 @@
#define UMODE_HIDDEN 0x00200000 /**< Operator status is hidden */
#define UMODE_OPER 0x00400000 /**< Operator */
#define UMODE_ADMIN 0x00800000 /**< Admin on server */
+#define UMODE_FARCONNECT 0x01000000 /**< Can see remote client connects/exits */
+
#define UMODE_ALL UMODE_SERVNOTICE
diff --git a/src/client.c b/src/client.c
index 85170d8..fed9a53 100644
--- a/src/client.c
+++ b/src/client.c
@@ -918,6 +918,11 @@ exit_client(struct Client *source_p, struct Client *from, const char *comment)
*/
close_connection(source_p);
}
+ else if (IsClient(source_p))
+ sendto_realops_flags(UMODE_FARCONNECT, L_ALL, SEND_NOTICE,
+ "Client exiting at %s: %s (%s@%s) [%s]",
+ source_p->servptr->name, source_p->name,
+ source_p->username, source_p->host, comment);
if (IsServer(source_p))
{
diff --git a/src/conf_lexer.l b/src/conf_lexer.l
index 6b199cd..e7c7f89 100644
--- a/src/conf_lexer.l
+++ b/src/conf_lexer.l
@@ -164,6 +164,7 @@ email { return EMAIL; }
encrypted { return ENCRYPTED; }
exceed_limit { return EXCEED_LIMIT; }
exempt { return EXEMPT; }
+farconnect { return T_FARCONNECT; }
file { return T_FILE; }
flags { return IRCD_FLAGS; }
flatten_links { return FLATTEN_LINKS; }
diff --git a/src/conf_parser.y b/src/conf_parser.y
index c163c76..3ce2774 100644
--- a/src/conf_parser.y
+++ b/src/conf_parser.y
@@ -309,6 +309,7 @@ reset_block_state(void)
%token T_DEBUG
%token T_DLINE
%token T_EXTERNAL
+%token T_FARCONNECT
%token T_FULL
%token T_INVISIBLE
%token T_IPV4
@@ -1175,6 +1176,10 @@ oper_umodes_item: T_BOTS
{
if (conf_parser_ctx.pass == 2)
block_state.modes.value |= UMODE_REGONLY;
+} | T_FARCONNECT
+{
+ if (conf_parser_ctx.pass == 2)
+ block_state.modes.value |= UMODE_FARCONNECT;
};
oper_flags: IRCD_FLAGS
@@ -2650,6 +2655,9 @@ umode_oitem: T_BOTS
} | T_LOCOPS
{
ConfigFileEntry.oper_umodes |= UMODE_LOCOPS;
+} | T_FARCONNECT
+{
+ ConfigFileEntry.oper_umodes |= UMODE_FARCONNECT;
};
general_oper_only_umodes: OPER_ONLY_UMODES
@@ -2721,6 +2729,9 @@ umode_item: T_BOTS
} | T_NONONREG
{
ConfigFileEntry.oper_only_umodes |= UMODE_REGONLY;
+} | T_FARCONNECT
+{
+ ConfigFileEntry.oper_only_umodes |= UMODE_FARCONNECT;
};
general_min_nonwildcard: MIN_NONWILDCARD '=' NUMBER ';'
diff --git a/src/s_user.c b/src/s_user.c
index a7844f0..6ec163e 100644
--- a/src/s_user.c
+++ b/src/s_user.c
@@ -92,7 +92,7 @@ unsigned int user_modes[256] =
UMODE_CCONN_FULL, /* C */
UMODE_DEAF, /* D */
0, /* E */
- 0, /* F */
+ UMODE_FARCONNECT, /* F */
UMODE_SOFTCALLERID, /* G */
UMODE_HIDDEN, /* H */
0, /* I */
@@ -554,6 +554,13 @@ register_remote_user(struct Client *source_p,
add_user_host(source_p->username, source_p->host, 1);
SetUserHost(source_p);
+ if (HasFlag(source_p->servptr, FLAGS_EOB))
+ sendto_realops_flags(UMODE_FARCONNECT, L_ALL, SEND_NOTICE,
+ "Client connecting at %s: %s (%s@%s) [%s] <%s>",
+ source_p->servptr->name,
+ source_p->name, source_p->username, source_p->host,
+ source_p->info, source_p->id);
+
introduce_client(source_p);
}