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/hybrid.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/hybrid.cpp')
| -rw-r--r-- | modules/protocol/hybrid.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index f10f0a26b..84cd73800 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -497,18 +497,15 @@ struct IRCDMessageUID : IRCDMessage if (ip == "0") /* Can be 0 for spoofed clients */ ip.clear(); - /* Source is always the server */ - User *user = new User(params[0], params[4], params[5], "", - ip, source.GetServer(), - params[9], params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : 0, - params[3], params[7]); - + NickAlias *na = NULL; if (params[8] != "0") - { - NickAlias *na = NickAlias::Find(params[8]); - if (na != NULL) - user->Login(na->nc); - } + na = NickAlias::Find(params[8]); + + /* Source is always the server */ + new User(params[0], params[4], params[5], "", + ip, source.GetServer(), + params[9], params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : 0, + params[3], params[7], na ? *na->nc : NULL); } }; |
