1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 04:43:13 +02:00

check for umode +r before sending svsmode -r

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2603 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
DukePyrolator
2009-11-02 06:04:27 +00:00
parent 9a0b1efc24
commit a1fe864c7f
3 changed files with 14 additions and 17 deletions
+9 -9
View File
@@ -198,10 +198,8 @@ class InspIRCdProto : public IRCDProto
*/
if (user->server->sync == SSYNC_IN_PROGRESS)
break;
if (add && !nick_identified(user)) {
common_svsmode(user, "-r", NULL);
user->RemoveMode(UMODE_REGISTERED);
}
if (add && !nick_identified(user))
SendUnregisteredNick(user);
break;
case 'x':
if (add && user->vhost)
@@ -401,11 +399,11 @@ class InspIRCdProto : public IRCDProto
send_cmd(TS6SID, "ADDLINE Z %s %s %ld 0 :%s", mask, whom, static_cast<long>(time(NULL)), reason);
}
/* SVSMODE +d */
/* nc_change was = 1, and there is no na->status */
/* SVSMODE -r */
void SendUnregisteredNick(User *u)
{
common_svsmode(u, "-r", NULL);
if (u->HasMode(UMODE_REGISTERED))
common_svsmode(u, "-r", NULL);
}
void SendSVSJoin(const char *source, const char *nick, const char *chan, const char *param)
@@ -909,7 +907,8 @@ int anope_event_uid(const char *source, int ac, const char **av)
if (user && user->server->sync == SSYNC_IN_PROGRESS && (!na || na->nc != user->nc))
{
validate_user(user);
common_svsmode(user, "-r", NULL);
if (user->HasMode(UMODE_REGISTERED))
common_svsmode(user, "-r", NULL);
}
user = NULL;
@@ -1194,7 +1193,8 @@ int anope_event_endburst(const char *source, int ac, const char **av)
if (u && u->server->sync == SSYNC_IN_PROGRESS && (!na || na->nc != u->nc))
{
validate_user(u);
common_svsmode(u, "-r", NULL);
if (u->HasMode(UMODE_REGISTERED))
common_svsmode(u, "-r", NULL);
}
alog("Processed ENDBURST for %s", s->name);