{"size": 419, "ext": "js", "max_stars_repo_path": "server/lib/send.js", "max_stars_repo_name": "text0rdie/rehi.chat", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server/lib/send.js", "max_issues_repo_name": "text0rdie/rehi.chat", "max_issues_repo_issues_event_min_datetime": "2019-11-23T18:23:53.000Z", "max_issues_repo_issues_event_max_datetime": "2019-11-23T18:23:53.000Z", "max_forks_repo_path": "server/lib/send.js", "max_forks_repo_name": "text0rdie/rehi.chat", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 27.9333333333, "max_line_length": 77, "alphanum_fraction": 0.5250596659}
const websocket = require('ws')

const message = require('./message.js')

module.exports = {
    all: function(content, type, exclude) {
        for (var id in global.users) {
            var client = global.users[id].client
            
            if (client != exclude && client.readyState === websocket.OPEN) {
                client.send(message.create(content, type))
            }
        }
    }
}