1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 06:56:38 +02:00

Set vhosts when users id to an account (and not a nick), add account arg to user ctor to ease handling users who connect already identified

This commit is contained in:
Adam
2013-06-19 18:59:26 -04:00
parent 5695c9e079
commit 5ac1e9175d
14 changed files with 181 additions and 131 deletions
+3 -6
View File
@@ -803,24 +803,21 @@ struct IRCDMessageNick : IRCDMessage
return;
}
User *user = new User(params[0], params[3], params[4], vhost, ip, s, params[10], user_ts, params[7]);
NickAlias *na = NULL;
if (params[6] == "0")
;
else if (params[6].is_pos_number_only())
{
if (convertTo<time_t>(params[6]) == user->signon)
na = NickAlias::Find(user->nick);
if (convertTo<time_t>(params[6]) == user_ts)
na = NickAlias::Find(params[0]);
}
else
{
na = NickAlias::Find(params[6]);
}
if (na)
user->Login(na->nc);
new User(params[0], params[3], params[4], vhost, ip, s, params[10], user_ts, params[7], "", na ? *na->nc : NULL);
}
else
source.GetUser()->ChangeNick(params[0]);