2014-09-13 21:29:45 +00:00
|
|
|
var _ = require("lodash");
|
|
|
|
|
|
|
|
module.exports = User;
|
|
|
|
|
|
|
|
function User(attr) {
|
2016-03-07 21:09:42 +00:00
|
|
|
// TODO: Remove this
|
2016-03-18 04:52:17 +00:00
|
|
|
attr.name = attr.name || attr.nick;
|
|
|
|
attr.mode = attr.mode || (attr.modes && attr.modes[0]) || "";
|
2016-03-07 21:09:42 +00:00
|
|
|
|
2014-09-13 21:29:45 +00:00
|
|
|
_.merge(this, _.extend({
|
|
|
|
mode: "",
|
|
|
|
name: ""
|
|
|
|
}, attr));
|
|
|
|
}
|