summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjantje_85 <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864>2009-09-26 14:07:37 +0000
committerjantje_85 <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864>2009-09-26 14:07:37 +0000
commit43f85bf4f2c60e354469f34f9be048a429c6a943 (patch)
tree9391df50731f30e1d3a6280df0abeca30dc647f3 /src
parent8011cd4f0b81ab5562de0361477ccc1c8d285db8 (diff)
Fixed users not being validated if metadata is received, even though it s for a different nickgroup.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2515 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/protocol/inspircd12.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp
index 8fa31d55e..adbdcf2e4 100644
--- a/src/protocol/inspircd12.cpp
+++ b/src/protocol/inspircd12.cpp
@@ -1168,15 +1168,17 @@ int anope_event_nick(const char *source, int ac, const char **av)
int anope_event_uid(const char *source, int ac, const char **av)
{
User *user;
+ NickAlias *na;
struct in_addr addy;
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 */
+ /* Check if the previously introduced user was Id'd for the nickgroup of the nick he s currently using.
+ * If not, validate the user. ~ Viper*/
user = prev_u_intro;
prev_u_intro = NULL;
- if (user && user->server->sync == SSYNC_IN_PROGRESS && !user->nc)
+ if (user && user->server->sync == SSYNC_IN_PROGRESS && (na = findnick(user->nick)) && na->nc != user->nc)
{
validate_user(user);
common_svsmode(user, "-r", NULL);
@@ -1413,6 +1415,7 @@ int anope_event_capab(const char *source, int ac, const char **av)
int anope_event_endburst(const char *source, int ac, const char **av)
{
+ NickAlias *na;
User *u = prev_u_intro;
Server *s = findserver_uid(servlist, source);
if (!s)
@@ -1420,9 +1423,11 @@ int anope_event_endburst(const char *source, int ac, const char **av)
throw new CoreException("Got ENDBURST without a source");
}
- /* Don't forget to mark the last user that was introduced as unregged, if applicable. ~ Viper */
+ /* Check if the previously introduced user was Id'd for the nickgroup of the nick he s currently using.
+ * If not, validate the user. ~ Viper*/
prev_u_intro = NULL;
- if (u && u->server->sync == SSYNC_IN_PROGRESS && !u->nc) {
+ if (u && u->server->sync == SSYNC_IN_PROGRESS && (na = findnick(u->nick)) && na->nc != u->nc)
+ {
common_svsmode(u, "-r", NULL);
validate_user(u);
}