This room is public. This room is private.
You are the owner of this room.
send |
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/server/index.js",
"cwd": "${workspaceRoot}/server/"
}
]
}
src/cca/platforms/android/**
src/node_modules/**
src/.sass-cache/**
src/cca/www/**
src/cca/config.xml
src/cordova/platforms/**
src/cordova/node_modules/**
src/cordova/plugins/**
src/cordova/www/**
src/cordova/config.xml
src/www/tmp/**
build/**
server/node_modules/**
server/settings.json
server/bans.json
server/logs/**
# IntelliJ IDEA files
*.iml
.idea
*.sw[mnpcod]
*.log
*.tmp
*.tmp.*
# Compiled source #
###################
*.com
@@ -21,7 +34,7 @@ server/logs/**
*.apk
*.ap_
*.es2015.js
*.es2015.js.map
*.map
# files for the dex VM
*.dex
exports.beat = function() {
io.on('connection', function(socket) {
// users.push(new User(socket));
new User(socket);
});
};
@@ -56,16 +55,24 @@ class Room {
}
leave(user) {
this.emit('leave', {
guid: user.guid
});
let userIndex = this.users.indexOf(user);
if (userIndex == -1) return;
this.users.splice(userIndex, 1);
checkRoomEmpty(this);
// HACK
try {
this.emit('leave', {
guid: user.guid
});
let userIndex = this.users.indexOf(user);
if (userIndex == -1) return;
this.users.splice(userIndex, 1);
checkRoomEmpty(this);
} catch(e) {
log.info.log('warn', 'roomLeave', {
e: e,
thisCtx: this
});
}
}
updateUser(user) {
@@ -138,7 +145,7 @@ let userCommands = {
"pawn": "passthrough",
"bees": "passthrough",
"color": function(color) {
if (typeof color == "undefined") {
if (typeof color != "undefined") {
if (settings.bonziColors.indexOf(color) == -1)
return;
@@ -162,6 +169,12 @@ let userCommands = {
target: sanitize(Utils.argsString(arguments))
});
},
"owo": function() {
this.room.emit("owo", {
guid: this.guid,
target: sanitize(Utils.argsString(arguments))
});
},
"triggered": "passthrough",
"vaporwave": function() {
this.socket.emit("vaporwave");
@@ -254,6 +267,8 @@ class User {
}
login(data) {
if (this.private.login) return;
log.info.log('info', 'login', {
guid: this.guid,
});
@@ -339,6 +354,7 @@ class User {
this.room.join(this);
this.private.login = true;
this.socket.removeAllListeners("login");
// Send all user info
this.socket.emit('updateAll', {
@@ -412,7 +428,6 @@ class User {
}
disconnect() {
let ip = "N/A";
let port = "N/A";
@@ -456,7 +471,11 @@ class User {
roomsPublic.splice(publicIndex, 1);
}
}
}
this.socket.removeAllListeners('talk');
this.socket.removeAllListeners('command');
this.socket.removeAllListeners('disconnect');
} catch(e) {
log.info.log('warn', "exception", {
guid: this.guid,
2 server/package.json
@@ -1,6 +1,6 @@
{
"name": "bonziworld_server",
"version": "2.0",
"version": "2.0.1",
"description": "Server for the BonziWORLD chat client.",
"main": "index.js",
"author": "Joseph Judge",
133 server/rooms.js.old
This file was deleted.
9 server/settings.example.json
@@ -7,7 +7,6 @@
"runlevel": {
"godmode": 0,
"youtube": 0,
"sanitize": 3,
"joke": 0,
"fact": 0,
"backflip": 0,
@@ -22,6 +21,8 @@
"vaporwave": 0,
"unvaporwave": 0,
"name": 0,
"owo": 0,
"sanitize": 3,
"pope": 3
},
"room_max": 8,
@@ -45,7 +46,6 @@
"runlevel": {
"godmode": 0,
"youtube": 0,
"sanitize": 3,
"joke": 0,
"fact": 0,
"backflip": 0,
@@ -60,6 +60,8 @@
"vaporwave": 0,
"unvaporwave": 0,
"name": 0,
"owo": 0,
"sanitize": 3,
"pope": 3
},
"room_max": 30,
@@ -102,7 +104,8 @@
"green",
"red",
"black",
"brown"
"brown",
"pink"
],
"banLength": 1440,
"port": 3000,
' +
''
);
});
"grunt-babel": "^6.0.0",
"grunt-build-number": "~1.0.0",
"grunt-contrib-clean": "~1.0.0",
"grunt-contrib-compress": "~1.3.0",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-htmlmin": "~1.4.0",
"grunt-contrib-imagemin": "~1.0.0",
@@ -5,6 +5,7 @@ $bonzi_height: 160px;
width: 100%;
height: 100%;
position: absolute;
pointer-events: none;
top: 0;
left: 0;
}
@@ -67,7 +68,7 @@ $bonzi_height: 160px;
top: 40px;
&::after {
background-image: url('/img/bonzi/bubble_tail_l.png');
background-image: url('../img/bonzi/bubble_tail_l.png');
width: 22px;
height: 14px;
@@ -81,7 +82,7 @@ $bonzi_height: 160px;
left: $bonzi_width - 45px;
&::after {
background-image: url('/img/bonzi/bubble_tail_r.png');
background-image: url('../img/bonzi/bubble_tail_r.png');
width: 22px;
height: 14px;
@@ -94,7 +95,7 @@ $bonzi_height: 160px;
top: $bonzi_height - 4px;
&::after {
background-image: url('/img/bonzi/bubble_tail_b.png');
background-image: url('../img/bonzi/bubble_tail_b.png');
width: 28px;
height: 22px;
@@ -107,18 +108,14 @@ $bonzi_height: 160px;
bottom: 4px;
&::after {
background-image: url('/img/bonzi/bubble_tail_t.png');
background-image: url('../img/bonzi/bubble_tail_t.png');
width: 28px;
height: 22px;
left: 110px;
}
}
.bubble_autowidth {
width: auto !important;
}
.bonzi_name {
border-style: solid;
border-width: 4px 12px 4px 0;
27 src/www/css/desktop.scss
@@ -22,12 +22,28 @@
z-index: 999;
}
#chat_tray {
background-image:
url("../img/desktop/notif_left.png"),
url("../img/desktop/notif.png");
background-repeat: no-repeat;
background-position: left;
background-size:
5px 30px,
100% 100%;
vertical-align: middle;
padding-left: 7px;
padding-top: 3px;
width: 22px;
}
.chat_bar_top {
top: 0;
}
#chat_send {
width: 100px;
user-select: none;
background-image: url("../img/desktop/start.png");
background-size: 100%;
background-repeat: no-repeat;
@@ -69,4 +85,15 @@
right: 0;
user-select: text;
-webkit-user-select: text;
}
.tray_btn {
width: 16px;
height: 16px;
display: inline-block;
margin: 2px 0px;
}
#btn_tile {
background-image: url("../img/desktop/tile.png");
}
24 src/www/css/desktop.vaporwave.scss
@@ -22,6 +22,30 @@ body.vaporwave {
z-index: 999;
}
#chat_tray {
background-image:
url("../img/desktop.vaporwave/notif_left.png"),
url("../img/desktop.vaporwave/notif_right.png"),
url("../img/desktop.vaporwave/notif.png");
background-repeat: no-repeat;
background-position:
left,
right,
left;
background-size:
5px 28px,
3px 28px,
100% 100%;
vertical-align: middle;
padding-left: 7px;
padding-top: 3px;
width: 22px;
}
#btn_tile {
background-image: url("../img/desktop.vaporwave/tile.png");
}
#chat_send {
width: 58px;
background-image: url("../img/desktop.vaporwave/start.png");
BIN -5.6 KB src/www/img/app/chrome.png
Binary file not shown.
BIN +103 Bytes src/www/img/desktop.vaporwave/notif.png
Binary file not shown.
BIN +106 Bytes src/www/img/desktop.vaporwave/notif_left.png
Binary file not shown.
BIN +97 Bytes src/www/img/desktop.vaporwave/notif_right.png
Binary file not shown.
BIN +271 Bytes src/www/img/desktop.vaporwave/tile.png
Binary file not shown.
BIN +641 Bytes src/www/img/desktop/tile.png
Binary file not shown.
11 src/www/index.html
@@ -18,8 +18,7 @@
@@ -37,18 +36,22 @@
send |