summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-05-08 19:35:16 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-05-08 19:35:16 +0000
commit40c415d36132c30c0325bfa84c17d49187f8e729 (patch)
tree073c7938cd461e4a0652d7f5308dd917a4f1209d /src
parent7195b6189fdd676d749e7ff0034734cbe85d8491 (diff)
- Added usermode F (remote client connect/exit notices) on public request
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@1977 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src')
-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
4 files changed, 25 insertions, 1 deletions
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);
}