client onmessage stub

This commit is contained in:
NatureFreshMilk 2019-08-15 13:03:32 +02:00
parent c71b7959a0
commit de1d26fce3

View File

@ -31,14 +31,12 @@ var channel_map = {
};
client.on('registered', function() {
Object.keys(channel_map).forEach(name => {
var channel = client.channel("#" + name);
channel.join();
channel.say(`beerchat_proxy connected! ingame-channel: ${name}`);
channels[name] = channel;
});
});
// mod -> web
@ -59,6 +57,10 @@ app.post('/api/message', jsonParser, function(req, res){
res.end();
});
client.on('message', function(event) {
// event = { message }
});
// TODO: web -> mod
app.listen(8080, () => console.log('Listening on http://127.0.0.1:8080'));