<commit_before>/**
 * Springle Chat
 *
 * @author <NAME>ka JSX <<EMAIL>>
 * @copyright 
 * @license GNU AFFERO GENERAL PUBLIC LICENSE v3
 */

var WebSocketServer = require('websocket').server;

// Check if SSL support is enabled
if (process.argv.indexOf('--enable-ssl') !== -1) {
    var https = require('https');
    var fs = require('fs');

    var options = {
        key: fs.readFileSync('/home/conf/ssl.key'),
        cert: fs.readFileSync('/home/conf/ssl.crt')
    };

    var server = https.createServer(options, function(request, response) {
        response.writeHead(404);
        response.end();
    });

    var port = 8805;
    var server_start_message = (new Date()) + ' Springle server with SSL is listening on port ' + port;
} else {
    var http = require('http');

    var server = http.createServer(function(request, response) {
        response.writeHead(404);
        response.end();
    });

    var port = 8804;
    var server_start_message = (new Date()) + ' Springle server is listening on port ' + port;
}



var clients = [];
var chat_rooms = {};

var allowed_origins = [
    'localhost',
    'springle.rebugged.com'
];

var allowed_protocol = 'chat';

var connection_id = 0;

server.listen(port, function() {<commit_msg>Added sky.rebugged.com and mozilla.net to allowed domains.<commit_after>/**
 * Springle Chat
 *
 * @author <NAME>ka JSX <<EMAIL>>
 * @copyright 
 * @license GNU AFFERO GENERAL PUBLIC LICENSE v3
 */

var WebSocketServer = require('websocket').server;

// Check if SSL support is enabled
if (process.argv.indexOf('--enable-ssl') !== -1) {
    var https = require('https');
    var fs = require('fs');

    var options = {
        key: fs.readFileSync('/home/conf/ssl.key'),
        cert: fs.readFileSync('/home/conf/ssl.crt')
    };

    var server = https.createServer(options, function(request, response) {
        response.writeHead(404);
        response.end();
    });

    var port = 8805;
    var server_start_message = (new Date()) + ' Springle server with SSL is listening on port ' + port;
} else {
    var http = require('http');

    var server = http.createServer(function(request, response) {
        response.writeHead(404);
        response.end();
    });

    var port = 8804;
    var server_start_message = (new Date()) + ' Springle server is listening on port ' + port;
}



var clients = [];
var chat_rooms = {};

var allowed_origins = [
    'localhost',
    'springle.rebugged.com',
    'sky.rebugged.com',
    'mozilla.net'
];

var allowed_protocol = 'chat';

var connection_id = 0;

server.listen(port, function() {
{'fraction_non_alphanumeric': 0.14821981424148606, 'fraction_numerical': 0.013157894736842105, 'mean_word_length': 3.0517241379310347, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2519202', 'n_tokens_mistral': 850, 'n_tokens_neox': 804, 'n_words': 212}