diff options
| author | 2022-06-16 15:39:09 +0000 | |
|---|---|---|
| committer | 2022-06-16 15:39:09 +0000 | |
| commit | 4579f8b555dca0d0e717651b03d5f87988a0745c (patch) | |
| tree | 97c4961afd78b243518f135b60a6bc0ee059e856 | |
| parent | only SetGotId when webirc spoofed username doesn't have ~ (diff) | |
| download | solanum-jess/webirc-ident.tar.gz solanum-jess/webirc-ident.tar.bz2 solanum-jess/webirc-ident.zip | |
don't override webirc spoofed username in USER jess/webirc-ident
| -rw-r--r-- | include/client.h | 3 | ||||
| -rw-r--r-- | ircd/s_conf.c | 2 | ||||
| -rw-r--r-- | ircd/s_user.c | 2 |
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; |
