summaryrefslogtreecommitdiff
path: root/src/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/bahamut.c1
-rw-r--r--src/protocol/inspircd11.c1
-rw-r--r--src/protocol/inspircd12.cpp30
-rw-r--r--src/protocol/ratbox.c1
-rw-r--r--src/protocol/unreal32.c1
5 files changed, 29 insertions, 5 deletions
diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c
index ecbb2c530..5aa704100 100644
--- a/src/protocol/bahamut.c
+++ b/src/protocol/bahamut.c
@@ -129,6 +129,7 @@ IRCDVar myIrcd[] = {
NULL, /* character set */
0, /* CIDR channelbans */
"$", /* TLD Prefix for Global */
+ false, /* Auth for users is sent after the initial NICK/UID command */
}
,
{NULL}
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c
index 38de551bf..cc8b7f73f 100644
--- a/src/protocol/inspircd11.c
+++ b/src/protocol/inspircd11.c
@@ -138,6 +138,7 @@ IRCDVar myIrcd[] = {
NULL, /* character set */
1, /* CIDR channelbans */
"$", /* TLD Prefix for Global */
+ false, /* Auth for users is sent after the initial NICK/UID command */
}
,
{NULL}
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp
index 338097f1c..8000f16a3 100644
--- a/src/protocol/inspircd12.cpp
+++ b/src/protocol/inspircd12.cpp
@@ -138,6 +138,7 @@ IRCDVar myIrcd[] = {
NULL, /* character set */
1, /* CIDR channelbans */
"$", /* TLD Prefix for Global */
+ true, /* Auth for users is sent after the initial NICK/UID command */
}
,
{NULL}
@@ -402,6 +403,9 @@ static int has_banexceptionmod = 0;
static int has_inviteexceptionmod = 0;
static int has_hidechansmod = 0;
+/* Previously introduced user during burst */
+static User *prev_u_intro;
+
/* CHGHOST */
void inspircd_cmd_chghost(const char *nick, const char *vhost)
@@ -465,6 +469,11 @@ class InspIRCdProto : public IRCDProto
else --opcnt;
break;
case 'r':
+ /* The users server is syncing, do not
+ * set them -r yet - Adam
+ */
+ if (user->server->sync == SSYNC_IN_PROGRESS)
+ break;
if (add && !nick_identified(user)) {
common_svsmode(user, "-r", NULL);
user->mode &= ~UMODE_r;
@@ -1163,6 +1172,16 @@ int anope_event_uid(const char *source, int ac, const char **av)
Server *s = findserver_uid(servlist, source);
uint32 *ad = reinterpret_cast<uint32 *>(&addy);
int ts = strtoul(av[1], NULL, 10);
+
+ /* Previously introduced user is still in buffer, so should be marked UNID'd */
+ user = prev_u_intro;
+ prev_u_intro = NULL;
+ if (user && user->server->sync == SSYNC_IN_PROGRESS && !user->nc)
+ {
+ validate_user(user);
+ common_svsmode(user, "-r", NULL);
+ }
+ user = NULL;
inet_aton(av[6], &addy);
user = do_nick("", av[2], /* nick */
@@ -1173,6 +1192,10 @@ int anope_event_uid(const char *source, int ac, const char **av)
ts, htonl(*ad), av[4], av[0]);
if (user)
{
+ if (user->server->sync == SSYNC_IN_PROGRESS)
+ {
+ prev_u_intro = user;
+ }
ircdproto->ProcessUsermodes(user, 1, &av[8]);
user->SetCloakedHost(av[4]);
}
@@ -1249,11 +1272,8 @@ int anope_event_metadata(const char *source, int ac, const char **av)
{
if ((u = find_byuid(av[0])))
{
- /* Check to see if the account name is the same
- * as the one saved for this nick, if so identify
- * them - Adam
- */
- u->CheckAuthenticationToken(av[2]);
+ /* Identify the user for this account - Adam */
+ u->AutoID(av[2]);
}
}
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index 271ab036c..33eb88570 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -114,6 +114,7 @@ IRCDVar myIrcd[] = {
NULL, /* character set */
0, /* CIDR channelbans */
"$$", /* TLD Prefix for Global */
+ false, /* Auth for users is sent after the initial NICK/UID command */
}
,
{NULL}
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c
index 9adbf0ffd..78d888518 100644
--- a/src/protocol/unreal32.c
+++ b/src/protocol/unreal32.c
@@ -151,6 +151,7 @@ IRCDVar myIrcd[] = {
NULL, /* character set */
0, /* CIDR channelbans */
"$", /* TLD Prefix for Global */
+ false, /* Auth for users is sent after the initial NICK/UID command */
}
,
{NULL}