diff options
author | Adam <Adam@anope.org> | 2013-06-19 18:59:26 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-06-19 19:03:56 -0400 |
commit | 5ac1e9175d90fad5feaf235dfe225ddffc47f257 (patch) | |
tree | 729e5c1b34e2c23f1c5cdba427e52958b1b17ff0 /modules/protocol/plexus.cpp | |
parent | 5695c9e079278e74692d55581769745c833bc284 (diff) |
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
Diffstat (limited to 'modules/protocol/plexus.cpp')
-rw-r--r-- | modules/protocol/plexus.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index e3efdc6e6..cacaa59d0 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -270,17 +270,17 @@ struct IRCDMessageUID : IRCDMessage ts = Anope::CurTime; } - User *user = new User(params[0], params[4], params[9], params[5], ip, source.GetServer(), params[10], ts, params[3], params[7]); + NickAlias *na = NULL; try { - if (params[8].is_pos_number_only() && convertTo<time_t>(params[8]) == user->timestamp) - { - NickAlias *na = NickAlias::Find(user->nick); - if (na) - user->Login(na->nc); - } + if (params[8].is_pos_number_only() && convertTo<time_t>(params[8]) == ts) + na = NickAlias::Find(params[0]); } catch (const ConvertException &) { } + if (params[8] != "0" && !na) + na = NickAlias::Find(params[8]); + + new User(params[0], params[4], params[9], params[5], ip, source.GetServer(), params[10], ts, params[3], params[7], na ? *na->nc : NULL); } }; |