aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/client.h3
-rw-r--r--ircd/s_conf.c2
-rw-r--r--ircd/s_user.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/include/client.h b/include/client.h
index 6a50f533..ec2b17f3 100644
--- a/include/client.h
+++ b/include/client.h
@@ -419,6 +419,7 @@ struct ListClient
#define FLAGS_EXEMPTSHIDE 0x04000000
#define FLAGS_EXEMPTJUPE 0x08000000
#define FLAGS_IDENTIFIED 0x10000000 /* owns their current nick */
+#define FLAGS_USER_SPOOFING 0x00000080 /* username has already been set, so ignore it in USER */
/* flags for local clients, this needs stuff moved from above to here at some point */
@@ -545,6 +546,8 @@ struct ListClient
#define SetExemptResv(x) ((x)->flags |= FLAGS_EXEMPTRESV)
#define IsIPSpoof(x) ((x)->flags & FLAGS_IP_SPOOFING)
#define SetIPSpoof(x) ((x)->flags |= FLAGS_IP_SPOOFING)
+#define IsUserSpoof(x) ((x)->flags & FLAGS_USER_SPOOFING)
+#define SetUserSpoof(x) ((x)->flags |= FLAGS_USER_SPOOFING)
#define IsExtendChans(x) ((x)->flags & FLAGS_EXTENDCHANS)
#define SetExtendChans(x) ((x)->flags |= FLAGS_EXTENDCHANS)
diff --git a/ircd/s_conf.c b/ircd/s_conf.c
index cb86811f..23863307 100644
--- a/ircd/s_conf.c
+++ b/ircd/s_conf.c
@@ -346,6 +346,8 @@ verify_access(struct Client *client_p, const char *username)
/* user@host spoof */
if((p = strchr(aconf->info.name, '@')) != NULL)
{
+ SetUserSpoof(client_p);
+
char *host = p+1;
*p = '\0';
diff --git a/ircd/s_user.c b/ircd/s_user.c
index d758b537..8a19b2ec 100644
--- a/ircd/s_user.c
+++ b/ircd/s_user.c
@@ -500,7 +500,7 @@ register_local_user(struct Client *client_p, struct Client *source_p)
}
/* dont replace username if its supposed to be spoofed --fl */
- if(!IsConfDoSpoofIp(aconf) || !strchr(aconf->info.name, '@'))
+ if(!IsUserSpoof(source_p))
{
p = myusername;