aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Bram Matthys2012-01-22 16:01:00 +0100
committerGravatar Bram Matthys2012-01-22 16:01:00 +0100
commit2df00337d45bdabb642b221be8d0e06fc2bf66cc (patch)
treea0e8a2ee8a0d1bee1fb3cb79e398fc9500869da3
parent- Add CAP support. Currently implemented are: multi-prefix (NAMESX), and (diff)
downloadunrealircd-2df00337d45bdabb642b221be8d0e06fc2bf66cc.tar.gz
unrealircd-2df00337d45bdabb642b221be8d0e06fc2bf66cc.tar.bz2
unrealircd-2df00337d45bdabb642b221be8d0e06fc2bf66cc.zip
- Fix issue with CAP & NOSPOOF. Patch from nenolod (#4077).
-rw-r--r--Changes1
-rw-r--r--src/modules/m_pingpong.c2
-rw-r--r--src/modules/m_user.c7
3 files changed, 5 insertions, 5 deletions
diff --git a/Changes b/Changes
index 2bc2acd09..92bc94b82 100644
--- a/Changes
+++ b/Changes
@@ -2350,3 +2350,4 @@
- Ditch vsyslog() as it's only a waste of CPU, inspired by #4065.
- Add CAP support. Currently implemented are: multi-prefix (NAMESX), and
userhost-in-names (UHNAMES). Patch from nenotopia (#4018, #4066).
+- Fix issue with CAP & NOSPOOF. Patch from nenolod (#4077).
diff --git a/src/modules/m_pingpong.c b/src/modules/m_pingpong.c
index 28a758658..b10a2918d 100644
--- a/src/modules/m_pingpong.c
+++ b/src/modules/m_pingpong.c
@@ -183,7 +183,7 @@ Debug((DEBUG_NOTICE, "NOSPOOF"));
sendto_one(sptr, ":IRC!IRC@%s PRIVMSG %s :\1VERSION\1",
me.name, sptr->name);
- if (sptr->user && sptr->name[0])
+ if (sptr->user && sptr->name[0] && !CHECKPROTO(sptr, PROTO_CLICAP))
return register_user(cptr, sptr, sptr->name,
sptr->user->username, NULL, NULL, NULL);
return 0;
diff --git a/src/modules/m_user.c b/src/modules/m_user.c
index ba138d7e0..995da75e3 100644
--- a/src/modules/m_user.c
+++ b/src/modules/m_user.c
@@ -203,10 +203,9 @@ DLLFUNC CMD_FUNC(m_user)
strlcpy(user->svid, sstamp, sizeof(user->svid));
strlcpy(sptr->info, realname, sizeof(sptr->info));
- if (sptr->name[0] &&
- (IsServer(cptr) ? 1 : IsNotSpoof(sptr)) &&
- (!MyConnect(sptr) || (MyConnect(sptr) && !CHECKPROTO(sptr, PROTO_CLICAP)))
- )
+ if (*sptr->name &&
+ (IsServer(cptr) || (IsNotSpoof(sptr) && !CHECKPROTO(sptr, PROTO_CLICAP)))
+ )
/* NICK and no-spoof already received, now we have USER... */
{
if (USE_BAN_VERSION && MyConnect(sptr))