thelounge/lib/models/chan.js

20 lines
302 B
JavaScript
Raw Normal View History

2014-06-26 23:05:47 +00:00
var _ = require("lodash");
module.exports = Chan;
Chan.Type = {
CHANNEL: "channel",
LOBBY: "lobby",
QUERY: "query"
};
function Chan(attr) {
_.merge(this, _.extend({
id: global.id = ++global.id || 1,
type: Chan.Type.CHANNEL,
name: "",
messages: [],
users: []
}));
}