summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-09 17:21:28 -0400
committerAdam <Adam@anope.org>2011-08-09 17:21:28 -0400
commitfa9f6a34ce5869e190811438c12c95942383fbfb (patch)
tree6ca0498dc13190e3a4fa6ad7aaa5c53ec3866966
parent6574bca40419c877e9fdebf76f75035db608f8e4 (diff)
Fixed sending account data for unconfirmed accounts
-rw-r--r--modules/core/ns_group.cpp3
-rw-r--r--modules/core/ns_register.cpp3
-rw-r--r--src/users.cpp7
3 files changed, 10 insertions, 3 deletions
diff --git a/modules/core/ns_group.cpp b/modules/core/ns_group.cpp
index c7a56cb8f..8ed1ab918 100644
--- a/modules/core/ns_group.cpp
+++ b/modules/core/ns_group.cpp
@@ -126,7 +126,10 @@ class CommandNSGroup : public Command
FOREACH_MOD(I_OnNickGroup, OnNickGroup(u, target));
ircdproto->SetAutoIdentificationToken(u);
if (target->nc->HasFlag(NI_UNCONFIRMED) == false)
+ {
u->SetMode(NickServ, UMODE_REGISTERED);
+ ircdproto->SendAccountLogin(u, u->Account());
+ }
Log(LOG_COMMAND, u, this) << "makes " << u->nick << " join group of " << target->nick << " (" << target->nc->display << ") (email: " << (!target->nc->email.empty() ? target->nc->email : "none") << ")";
source.Reply(_("You are now in the group of \002%s\002."), target->nick.c_str());
diff --git a/modules/core/ns_register.cpp b/modules/core/ns_register.cpp
index b1d70c9a5..964f32bec 100644
--- a/modules/core/ns_register.cpp
+++ b/modules/core/ns_register.cpp
@@ -204,8 +204,9 @@ class CommandNSRegister : public Command
source.Reply(_("If you do not confirm your email address within %s your account will expire."), duration(Config->NSUnconfirmedExpire).c_str());
}
}
+ else
+ ircdproto->SendAccountLogin(u, u->Account());
- ircdproto->SendAccountLogin(u, u->Account());
ircdproto->SetAutoIdentificationToken(u);
u->lastnickreg = Anope::CurTime;
diff --git a/src/users.cpp b/src/users.cpp
index f2206be7f..9c076363a 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -351,7 +351,8 @@ void User::Identify(NickAlias *na)
}
this->Login(na->nc);
- ircdproto->SendAccountLogin(this, this->Account());
+ if (!na->nc->HasFlag(NI_UNCONFIRMED))
+ ircdproto->SendAccountLogin(this, this->Account());
ircdproto->SetAutoIdentificationToken(this);
NickAlias *this_na = findnick(this->nick);
@@ -908,9 +909,11 @@ User *do_nick(const Anope::string &source, const Anope::string &nick, const Anop
na->last_seen = Anope::CurTime;
user->UpdateHost();
do_on_id(user);
- ircdproto->SetAutoIdentificationToken(user);
if (na->nc->HasFlag(NI_UNCONFIRMED) == false)
+ {
+ ircdproto->SetAutoIdentificationToken(user);
user->SetMode(NickServ, UMODE_REGISTERED);
+ }
Log(NickServ) << user->GetMask() << " automatically identified for group " << user->Account()->display;
}