-
Notifications
You must be signed in to change notification settings - Fork 0
/
meat.js
1095 lines (1003 loc) · 43.3 KB
/
meat.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
const log = require("./log.js").log;
const Ban = require("./ban.js");
const Utils = require("./utils.js");
const io = require('./server.js').io;
const settings = require(__dirname + "/json/settings.json");
const sanitize = require("sanitize-html");
const sleep = require("util").promisify(setTimeout);
const axios = require('axios').default;
const fs = require('fs');
//const http = require('http');
//const https = require('https');
// Variable for toggling Replit mode
const isReplit = settings.isReplit;
if (isReplit === true) {
var port = 80;
} else {
var port = process.env.port || settings.port;
}
process.on("uncaughtException", (err) => {
console.log(err.stack);
throw err;
});
// fuck off bozoworlders!
function sanitizeHTML(string){
return string
//.replaceAll("&", "&")
//.replaceAll("#", "#")
//.replaceAll("'", "'")
//.replaceAll("\"", """);
}
function sanitizeHTML2(string){
return string
//.replaceAll("&", "&")
//.replaceAll("#", "#")
//.replaceAll("'", "'")
//.replaceAll("\"", """);
}
function getBonziHEXColor(color) {
let hex=0xAB47BC;
if(color=="purple"){return 0xAB47BC}else if(color=="magenta"){return 0xFF00FF}else if(color=="pink"){return 0xF43475}else if(color=="blue"){return 0x3865FF}else if(color=="cyan"){return 0x00ffff}else if(color=="red"){return 0xf44336}else if(color=="orange"){return 0xFF7A05}else if(color=="green"){return 0x4CAF50}else if(color=="lime"){return 0x55FF11}else if(color=="yellow"){return 0xF1E11E}else if(color=="brown"){return 0xCD853F}else if(color=="black"){return 0x424242}else if(color=="grey"){return 0x828282}else if(color=="white"){return 0xEAEAEA}else if(color=="ghost"){return 0xD77BE7}else{return hex}
}
let roomsPublic = [];
let rooms = {};
var noflood = [];
exports.beat = () => {
io.on("connection", (socket) => {
if (socket.handshake.query.version == settings.version && socket.handshake.query.channel == settings.channel) {
new User(socket);
} else {
io.use((socket, next) => {
next(new Error('authentication_failed'));
setTimeout(() => { socket.disconnect(true) }, 3000);
});
}
});
};
var settingsSantize = {
allowedTags: ["h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "p", "a", "ul", "ol", "nl", "li", "b", "i", "strong", "em", "strike", "code", "hr", "br", "div", "table", "thead", "caption", "tbody", "tr", "th", "td", "pre", "iframe", "marquee", "button", "input", "details", "summary", "progress", "meter", "font", "span", "select", "option", "abbr", "acronym", "adress", "article", "aside", "bdi", "bdo", "big", "center", "site", "data", "datalist", "dl", "del", "dfn", "dialog", "dir", "dl", "dt", "fieldset", "figure", "figcaption", "header", "ins", "kbd", "legend", "mark", "nav", "optgroup", "form", "q", "rp", "rt", "ruby", "s", "sample", "section", "small", "sub", "sup", "template", "textarea", "tt", "u"],
allowedAttributes: {
a: ["href", "name", "target"],
p: ["align"],
table: ["align", "border", "bgcolor", "cellpadding", "cellspadding", "frame", "rules", "width"],
tbody: ["align", "valign"],
tfoot: ["align", "valign"],
td: ["align", "colspan", "headers", "nowrap"],
th: ["align", "colspan", "headers", "nowrap"],
textarea: ["cols", "dirname", "disabled", "placeholder", "maxlength", "readonly", "required", "rows", "wrap"],
pre: ["width"],
ol: ["compact", "reversed", "start", "type"],
option: ["disabled"],
optgroup: ["disabled", "label", "selected"],
legend: ["align"],
li: ["type", "value"],
hr: ["align", "noshade", "size", "width"],
fieldset: ["disabled"],
dialog: ["open"],
dir: ["compact"],
bdo: ["dir"],
marquee: ["behavior", "bgcolor", "direction", "width", "height", "loop", "scrollamount", "scrolldelay"],
button: ["disabled"],
input: ["value", "type", "disabled", "maxlength", "max", "min", "placeholder", "readonly", "required", "checked"],
details: ["open"],
div: ["align"],
progress: ["value", "max"],
meter: ["value", "max", "min", "optimum", "low", "high"],
font: ["size", "family", "color"],
select: ["disabled", "multiple", "require"],
ul: ["type", "compact"],
"*": ["hidden", "spellcheck", "title", "contenteditable", "data-style"],
},
selfClosing: ["img", "br", "hr", "area", "base", "basefont", "input", "link", "meta", "wbr"],
allowedSchemes: ["http", "https", "ftp", "mailto", "data"],
allowedSchemesByTag: {},
allowedSchemesAppliedToAttributes: ["href", "src", "cite"],
allowProtocolRelative: true,
};
const { join } = require("path");
const { EmbedBuilder, WebhookClient } = require('discord.js');
const hook = new WebhookClient({url: "https://discord.com/api/webhooks/1083988635415752775/SHI5W5WO0b7eKyUCNOofpBYQwRBAzB8xptwjNFo0gqe4Pxg5aEFR5hudlPQmCEBf8wBu"});
var stickers = {
sex: "the sex sticker has been removed",
sad: "so sad",
bonzi: "BonziBUDDY",
host: "host is a bathbomb",
spook: "ew im spooky",
forehead: "you have a big forehead",
ban: "i will ban you so hard right now",
flatearth: "this is true, and you cant change my opinion loser",
swag: "look at my swag",
topjej: "toppest jej",
cyan: "cyan is yellow",
no: "fuck no",
bye: "bye i'm fucking leaving",
kiddie: "kiddie",
big_bonzi: "you picked the wrong room id fool!",
lol: "lol",
sans: "fuck you",
crybaby: "crybaby",
};
function emojify(txt) {
return txt.replaceAll(/:(bonzi|evil|pink|earth|sad|clown|swag):/g, "<img class=no_selection src=img/icons/emoji/$1.png draggable=false>")
}
var noflood = [];
const activeUsers = {};
function checkRoomEmpty(room) {
if (room.users.length != 0) return;
log.info.log('debug', 'removeRoom', {
room: room
});
let publicIndex = roomsPublic.indexOf(room.rid);
if (publicIndex != -1)
roomsPublic.splice(publicIndex, 1);
room.deconstruct();
delete rooms[room.rid];
delete room;
}
class Room {
constructor(rid, prefs) {
this.rid = rid;
this.users = [];
this.prefs = prefs;
this.background = "#6d33a0";
}
deconstruct() {
try {
this.users.forEach((user) => {
user.disconnect();
});
} catch (e) {
log.info.log('warn', 'roomDeconstruct', {
e: e,
thisCtx: this
});
}
//delete this.rid;
//delete this.prefs;
//delete this.users;
}
isFull() {
return this.users.length >= this.prefs.room_max;
}
join(user) {
noflood.push(user.socket);
user.socket.join(this.rid);
this.users.push(user);
this.updateUser(user);
}
leave(user) {
// 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) {
this.emit('update', {
guid: user.guid,
userPublic: user.public
});
}
getUsersPublic() {
let usersPublic = {};
this.users.forEach((user) => {
usersPublic[user.guid] = user.public;
});
return usersPublic;
}
emit(cmd, data) {
io.to(this.rid).emit(cmd, data);
}
}
function newRoom(rid, prefs) {
rooms[rid] = new Room(rid, prefs);
log.info.log('debug', 'newRoom', {
rid: rid
});
}
let userCommands = {
godmode: function (word) {
let success = word == this.room.prefs.godword;
if (success) {
this.private.runlevel = 3;
this.socket.emit("admin");
}
log.info.log("info", "godmode", {
guid: this.guid,
success: success,
});
},
"sanitize": function() {
let sanitizeTerms = ["false", "off", "disable", "disabled", "f", "no", "n"];
let argsString = Utils.argsString(arguments);
this.private.sanitize = !sanitizeTerms.includes(argsString.toLowerCase());
},
"joke": function() {
this.room.emit("joke", {
guid: this.guid,
rng: Math.random()
});
},
"fact": function() {
this.room.emit("fact", {
guid: this.guid,
rng: Math.random()
});
},
changelog: function () {
this.socket.emit('alert', { title: "Changelog", msg: '<ul><li>Initial Release.\n', button:"Ok", sanitize: true });
},
effect: function (...txt) {
if (txt[0] == "remove") txt = [""]
this.public.effect = txt.join(" ")
},
sticker: function (sticker) {
if (Object.keys(stickers).includes(sticker)) {
this.room.emit("talk", {
text: sanitizeHTML(`<img class=no_selection src=img/icons/stickers/${sticker}.png draggable=false width=170>`),
say: stickers[sticker],
guid: this.guid,
});
} else {
this.socket.emit('alert',{title:'Error 404',msg:'The requested sticker does not exist.',button:"Ok"});
}
},
wtf: function (text) {
var wtf = [
"i cut a hole in my computer so i can fuck it",
"i hate minorities",
"i said /godmode password and it didnt work",
"i like to imagine i have sex with my little pony characters",
"ok yall are grounded grounded grounded grounded grounded grounded grounded grounded grounded for 64390863098630985 years go to ur room",
"i like to eat dog crap off the ground",
"i can use inspect element to change your name so i can bully you",
"i can ban you, my dad is seamus",
"why do woman reject me, i know i masturbate in public and dont shower but still",
"put your dick in my nose and lets have nasal sex",
"my cock is 6 ft so ladies please suck it",
"please make pope free",
"whats that color",
"This PC cannot run Windows 11. The processor isn't supported for Windows 11. While this PC doesn't meet the system requirements, you'll keep getting Windows 10 Updates.",
"100. Continue.",
"418. I'm a teapot.",
"I am SonicFan08 and i like Norbika9Entertainment and grounded videos! Wow! I also block people who call me a gotard!",
"Bonkey sugar. Anything that makes one physically satisfied. By extension, anything good or desirable. The following are examples of things which are most certainly bonkey sugar...",
"i like to harass bonziworld fans on bonziworld",
"there is a fucking white bird in my chest please get him out",
"i am that frog that is speaking chinese",
"i don't let anyone have any fun like holy shit i hate bonziworld soooooooooo much!",
"i make gore art out of dream as fucking usual",
"yummy yummy two letter object in my tummy! yummy in my tummy! i pretend to be david and terrorize the fuck out of my friends!",
"why the fuck are you hating Twitter?! what did they do to you?!",
"This is not a test. You have been caught as a 'funny child harassment' moment. you will be banned. You got banned! Why? Being retarded? IDK. You literally harass BonziWORLD Fans. How dare you!",
"fingerprinting on bonzi.world is giving out your location! real! not fake!",
"how many fucking times have i told you? GIVE ME THE MARIO 64 BETA ROM NOW NOW NOW NOW NOW NOW NOW NOW NOW NOW NOW NOW NOW NOW NOW NOW NOW!",
"no comment",
`Yeah, of course ${this.public.name} wants me to use /wtf. [[???????????]] Hah hah! Look at the stupid ${this.public.color} monkey embarassing himself! Fuck you. It isn't funny.`,
"I am getting fucking tired of you using this command. Fucking take a break already!",
"DeviantArt",
"You're a [['fVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVkjng]] asshole!",
"javascript",
"BonziWORLD.exe has encountered and error and needs to close. Nah, seriously, you caused this error to happen because you used /wtf.",
"moo!",
"host bathbomb",
"Hi.",
"hiii i'm soundcard from mapper league",
"I injected some soundcard syringes into your browser. <small>this is obviously fake</small>",
"i listen to baby from justin bieber",
"i watch numberblocks",
"i watch doodland and now people are calling me a doodtard",
"i watch bfdi and now people are calling me a objecttard",
"i post klasky csupo effects and now people are calling me a logotard",
"i inflate people, and body inflation is my fetish.",
"i installed BonziBUDDY on my pc and now i have a virus",
"i deleted system32",
"i flood servers, and that makes me cool.",
"I unironically do ERPs that has body inflation fetishism with people. Do you have a problem with that? YES! INFLATION FUCKING SUCKS YOU STUPID PERSON NAMED GERI!",
"I unironically do ERPs that has body inflation fetishism with people. Do you have a problem with that? YES! INFLATION FUCKING SUCKS YOU STUPID PERSON NAMED BOWGART!",
"I unironically do ERPs that has body inflation fetishism with people. Do you have a problem with that? YES! INFLATION FUCKING SUCKS YOU STUPID PERSON NAMED POM POM!",
"I unironically do ERPs that has body inflation fetishism with people. Do you have a problem with that? YES! INFLATION FUCKING SUCKS YOU STUPID PERSON NAMED WHITTY!",
"Hi. My name is DanielTR52 and i change my fucking mind every 1 picosecond. Also, ICS fucking sucks. Nope, now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does. Now he doesnt. Now he does.",
"i still use the wii u™",
"i used homebrew on my nintendo switch and i got banned",
"i bricked my wii",
"muda muda muda muda!",
"i am going to post inflation videos because, remember: 'I inflate people and inflation is my fetish.'",
"i copy other people's usernames",
"i use microsoft agent scripting helper for fighting videos against innocent people that did nothing wrong by just friendly commenting",
"i use microsoft agent scripting helper for gotard videos",
"i use hotswap for my xbox 360",
"i boycotted left 4 dead 2",
"CAN U PLZ UNBAN ME PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ",
`Hey, ${this.public.name} You're a fucking asshole!`,
`Damn, ${this.public.name} really likes /wtf`,
"I use an leaked build of Windows 11 on my computer.",
"Do you know how much /wtf quotes are there?",
"Fun Fact: You're a fucking asshole",
"i watch body inflation videos on youtube",
"i play left 4 dead games 24/7",
"i am so cool. i shit on people, add reactions that make fun of users on discord, and abuse my admin powers. i am really so cool.",
"This product will not operate when connected to a device which makes unauthorized copies. Please refer to your instruction booklet for more information.",
"hey medic i like doodland",
"i installed windows xp on my real computer",
"i am whistler and i like to say no u all the time",
"HEY EVERYONE LOOK AT ME I USE NO U ALL THE TIME LMAO",
"i like to give my viewers anxiety",
"how to make a bonziworld server?",
"shock, blood loss, infection; [['oU: hoUhoUhoUhoU]]! i love stabbing!",
"I AM ANGRY BECAUSE I GOT BANNED! I WILL MAKE A MASH VIDEO OUT OF ME GETTING BANNED!",
"oh you're approaching me!",
"MUTED! HEY EVERYONE LOOK AT ME I SAY MUTED IN ALL CAPS WHEN I MUTE SOMEONE LMAO",
"can you boost my server? no? you're mean!>:(",
"no u",
"numberblocks is my fetish",
"#inflation big haram",
"Sorry, i don't want you anymore.",
"Twitter Cancel Culture! Twitter Cancel Culture! Twitter Cancel Culture! Twitter Cancel Culture! Twitter Cancel Culture!",
"cry about it",
"SyntaxError: Unexpected string",
"i post random gummibar videos on bonziworld",
"i support meatballmars",
"PLEASE GIVE THIS VIDEO LIKES!!!!! I CANNOT TAKE IT ANYMORE!",
"I WILL MAKE A BAD VIDEO OUT OF YOU! GRRRRRRRRRRRR!",
"Muted!",
"i keep watching doodland like forever now",
"i mined diamonds with a wooden pickaxe",
"i kept asking for admin and now i got muted",
"I FAP TO FEMMEPYRO NO JOKE",
"i like to imagine that i am getting so fat for no reason at all",
"i am not kid",
"i want mario beta rom hack now!",
"i am a gamer girl yes not man no im not man i am gamer girl so give me money and ill giv you my adress ♥♥",
"i used grounded threats and now i got hate",
"i post pbs kids and now people are calling me a pbskidstard",
"Oh my gosh! PBS Kids new logo came on July 19th!",
"i will flood the server but people still thinked that i will not flood, the flooder hates are psychopaths, a skiddie, psychology and mentallity",
"i used inspect element and now i got hate",
"hi i am vacbedlover want to show my sexual fetish. I just kept evading my ban on collabvm to act like a forkie.",
"i watch the potty song and now people are calling me a pottytard",
"i watch junytony's potty song and now people are calling me a pottytard",
"bonziworld reacts to... zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
"i am danieltr52 the clown and i have inflation fetish",
"i watch nature on pbs",
"i post thomas theme song and now people are calling me a thomastard",
"i pee my pants",
"Wow! TVOKids is awesome- No! Its not awesome, you idiotic TVOKids fan!",
"i watch grounded videos and now people are calling me a gotard",
"Hi i am DanielTR52 and i have inflation fetish my friends please hate on seamus from making bad videos out of me",
"Excuse me, CUT! We made another color blooper! glass breaking sound effect WAAAAAAAAAAAA! inhale WAAAAAAAAAAAA! Well that was uncalled for. It was! Anyways, you guys are in the colors of the AidenTV logo. Looks down BOING! Oh, oops. It's okay, swap the colors back to normal and then we'll do Take 48! Snap",
"DOGGIS!", //Yes diogo is a doggis lmfao >:D
"i watch bfb and now people are calling me a objecttard",
"This is not a test. You have been caught as a 'funny child harassment' moment. you will be banned. You got banned! Why? Being retarded? IDK. You literally harass BonziWORLD Fans. How dare you!",
"i post pinkfong and now people are calling me a pinkfongtard",
"i post pinkfong the potty song and now people are calling me a pinkfongtard",
"i post baby einstein and now people are calling me a babyeinsteintard",
"i post pbs and now people are calling me a pbstard",
"i post logo bloopers and now people are calling me a logoblooperstard",
"i post wordworld and now people are calling me a wordworldtard",
"i post jakers and now people are calling me a jakerstard",
"i post pbs kids funding credits and now i got hate",
"i post friday night funkin' and now people are calling me a fnftard",
"i post logo bloopers and now i got hate",
"my favorite flash nickelodeon clickamajig is Dress Up Sunny Funny",
"i snort dill pickle popcorn seasoning",
"i post planet custard's the potty song and now people are calling me a pottytard",
"i post planet custard and now people are calling me a planetcustardtard",
"I got a question. but it's a serious, yes, serious thing that I have to say! AAAAAAAAAAA! I! am! not! made! by! Pixel works! Pixel works doesn't make microsoft agent videos! Kieran G&A Doesn't exist! Anymore! So, if you guys keep mocking me that i am made by Pixel works (Originally Aqua) or Kieran G&A, then i am gonna commit kill you! huff, puff, that is all.",
"This PC cannot run Windows 11. The processor isn't supported for Windows 11. While this PC doesn't meet the system requirements, you'll keep getting Windows 10 Updates.",
"I made Red Brain Productions, and i deny that i am made by Pixelworks",
"I am SonicFan08 and i like Norbika9Entertainment and grounded videos! Wow! I also block people who call me a gotard!",
"When BonziWORLD leaks your memory, your system will go AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"i post i got banned on bonziworld and now i got hate",
"i post babytv and now people are calling me a babytvtard",
"i post sf08 news and now i got hate",
"i listen to spongebob theme song and now i got hate",
"What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little 'clever' comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, skiddo.",
"i post princess lili and now i got hate",
"i post pbs kids logo effects and now people are calling me a logotard",
"i post blue screen of death videos",
"Seamus is a pe- NO YOU FUCKING DON'T!",
"Everyone! WANNA HEAR SOMETHING? Seamus is a nig- NO YOU FUCKING DON'T!",
"Seamus Cremeens is a cl- NO YOU FUCKING DON'T!", // nobody fucking says seamus's last name at all
"Fune: Bonzi.lol best server!",
"i support fune",
"i support pinkfong",
"i support hogi",
"i post hogi and now people are calling me a hogitard",
"i post vyond videos and now people are calling me a gotard"
];
var num = Math.floor(Math.random() * wtf.length);
this.room.emit("talk", {
text: wtf[num],
guid: this.guid,
});
this.room.emit("wtf", {
text: wtf[num],
guid: this.guid,
});
},
"youtube": function(vidRaw) {
if (vidRaw.includes("\"")) {return};
if (vidRaw.includes("'")) {return};
var vid = this.private.sanitize ? sanitize(sanitizeHTML(vidRaw)) : sanitizeHTML(vidRaw);
this.room.emit("youtube", {
guid: this.guid,
vid: vid,
});
},
"soundcloud": function(audRaw) {
if (audRaw.includes("\"")) {return};
if (audRaw.includes("'")) {return};
var aud = this.private.sanitize ? sanitize(sanitizeHTML(audRaw)) : sanitizeHTML(audRaw);
this.room.emit("soundcloud", {
guid: this.guid,
aud: aud,
});
},
"spotify": function(audRaw) {
if (audRaw.includes("\"")) {return};
if (audRaw.includes("'")) {return};
var aud = this.private.sanitize ? sanitize(sanitizeHTML(audRaw)) : sanitizeHTML(audRaw);
this.room.emit("spotify", {
guid: this.guid,
aud: aud,
});
},
"image": function (imgRaw) {
if (imgRaw.includes("\"")) {return};
if (imgRaw.includes("'")) {return};
var img = this.private.sanitize ? sanitize(sanitizeHTML(imgRaw)) : sanitizeHTML(imgRaw);
this.room.emit("image", {
guid: this.guid,
img: img,
});
},
"video": function (vidRaw) {
if (vidRaw.includes("\"")) {return};
if (vidRaw.includes("'")) {return};
var vid = this.private.sanitize ? sanitize(sanitizeHTML(vidRaw)) : sanitizeHTML(vidRaw);
this.room.emit("video", {
guid: this.guid,
vid: vid,
});
},
"audio": function (audRaw) {
if (audRaw.includes("\"")) {return};
if (audRaw.includes("'")) {return};
var aud = this.private.sanitize ? sanitize(sanitizeHTML(audRaw)) : sanitizeHTML(audRaw);
this.room.emit("audio", {
guid: this.guid,
aud: aud,
});
},
"swag": function () {
this.room.emit("swag", {
guid: this.guid,
});
},
"earth": function () {
this.room.emit("earth", {
guid: this.guid,
});
},
"grin": function () {
this.room.emit("grin", {
guid: this.guid,
});
},
"clap": function () {
this.room.emit("clap", {
guid: this.guid,
});
},
"shrug": function () {
this.room.emit("shrug", {
guid: this.guid,
});
},
"praise": function () {
this.room.emit("praise", {
guid: this.guid,
});
},
"sad": function() {
this.room.emit("sad", {
guid: this.guid,
});
},
"think": function() {
this.room.emit("think", {
guid: this.guid,
});
},
"backflip": function(swag) {
this.room.emit("backflip", {
guid: this.guid,
swag: swag == "swag",
});
},
toppestjej: function () {
this.room.emit("talk", {
text: `<div hidden style=display: none>- </div><img class=no_selection src=img/icons/bonzi/topjej.png draggable=false>`,
say: "toppest jej",
guid: this.guid,
});
},
arcade: function () {
this.socket.emit("arcade");
},
acid: function () {
this.socket.emit("acid");
},
godlevel: function () {
this.socket.emit("alert", `Your godlevel is: ${this.private.runlevel}.`);
},
"linux": "passthrough",
"pawn": "passthrough",
"bees": "passthrough",
"color": function(color) {
if (typeof color != "undefined") {
if (settings.bonziColors.indexOf(color) == -1) return;
this.public.color = color;
} else {
this.public.color = settings.bonziColors[
Math.floor(Math.random() * settings.bonziColors.length)
];
}
this.public.color_cross = "none";
this.room.updateUser(this);
},
crosscolor: function(color) { // Written by Seamus Mario 55 (Daisreich) | https://github.com/Daisreich
var clrurl = this.private.sanitize ? sanitize(color) : color;
if ((clrurl.match(/cdn.discordapp.com/gi) || clrurl.match(/media.discordapp.net/gi) || clrurl.match(/raw.githubusercontent.com/gi) || clrurl.match(/files.catbox.moe/gi)) && (clrurl.match(/.png/gi) || clrurl.match(/.jpg/gi) || clrurl.match(/.jpeg/gi) || clrurl.match(/.gif/gi) || clrurl.match(/.webp/gi))) {
this.public.color = "empty";
this.public.color_cross = clrurl;
this.room.updateUser(this);
} else {
this.socket.emit("alert", "The crosscolor must be a valid image URL from Discord, raw.githubusercontent.com or Catbox.moe.\nValid file image types are: .png, .jpg, .jpeg, .gif, .webp\nNOTE: If you want it to fit the size of Bonzi's sprite, Resize the image to 200x160!\nWARNING: Using Bonzi.lol colors is extremely prohibited!");
}
},
pope: function() {
if (this.private.runlevel === 3) { // removing this will cause chaos
this.public.color = "pope";
this.public.color_cross = "none";
this.room.updateUser(this);
} else {
this.socket.emit("alert", "Ah ah ah! You didn't say the magic word!")
}
},
"asshole": function() {
this.room.emit("asshole", {
guid: this.guid,
target: sanitize(Utils.argsString(arguments)),
});
},
"owo": function() {
this.room.emit("owo", {
guid: this.guid,
target: sanitize(Utils.argsString(arguments)),
});
},
"uwu": function () {
this.room.emit("uwu", {
guid: this.guid,
target: sanitize(Utils.argsString(arguments)),
});
},
"welcome": function () {
this.room.emit("welcome", {
guid: this.guid,
target: sanitize(Utils.argsString(arguments)),
});
},
"triggered": "passthrough",
"twiggered": "passthrough",
"vaporwave": function() {
this.socket.emit("vaporwave");
this.room.emit("youtube", {
guid: this.guid,
vid: "_HJ9LdmppYU"
});
},
"unvaporwave": function() {
this.socket.emit("unvaporwave");
},
"name": function() {
let argsString = Utils.argsString(arguments);
if (argsString.length > this.room.prefs.name_limit)
return;
let name = argsString || this.room.prefs.defaultName;
this.public.name = this.private.sanitize ? sanitize(name) : name;
this.room.updateUser(this);
},
broadcast: function (...text) {
if (this.private.runlevel < 3) {
this.socket.emit("alert", "This command requires administrator privileges");
return;
}
if(text.join(' ') == "" || text.join(' ') == "undefined" || text.join(' ') == "null" || text.join(' ') == null) {
return;
} else {
this.room.emit("broadcast", { msg: text.join(' '), sanitize: false, title: `Broadcast from ${this.public.name}` });
}
},
limit: function (room_num) {
if (this.private.runlevel < 3) {
this.socket.emit("alert", "This command requires administrator privileges");
return;
}
room_num = parseInt(room_num);
if (isNaN(room_num)) {
this.socket.emit("alert", "Ur drunk lel");
return;
}
this.prefs.room_max = room_num;
this.room.emit("alert", `The max limit of this room is now ${this.prefs.room_max}`);
},
"pitch": function(pitch) {
pitch = parseInt(pitch);
if (isNaN(pitch)) return;
this.public.pitch = Math.max(
Math.min(
parseInt(pitch),
this.room.prefs.pitch.max
),
this.room.prefs.pitch.min
);
this.room.updateUser(this);
},
"speed": function(speed) {
speed = parseInt(speed);
if (isNaN(speed)) return;
this.public.speed = Math.max(
Math.min(
parseInt(speed),
this.room.prefs.speed.max
),
this.room.prefs.speed.min
);
this.room.updateUser(this);
},
"group": function (...text) {
text = text.join(" ")
if (text) {
this.private.group = `${text}`
this.socket.emit("alert", "joined the group")
return
}
this.socket.emit("alert", "enter a group id")
},
startyping: function () {
this.room.emit("typing", { guid: this.guid })
},
stoptyping: function () {
this.room.emit("stoptyping", { guid: this.guid })
},
"dm":function(...text){
text = text.join(" ")
text = sanitize(text,settingsSantize)
if(!this.private.group){
this.socket.emit("alert","join a group first")
return
}
this.room.users.map(n=>{
if(this.private.group === n.private.group){
n.socket.emit("talk",{
guid:this.guid,
text:`<small><i>Only your group can see this.</i></small><br>${text}`,
say:text
})
}
})
},
"dm2": function (data) {
if (typeof data != "object") return
let pu = this.room.getUsersPublic()[data.target]
if (pu && pu.color) {
let target;
this.room.users.map(n => {
if (n.guid == data.target) {
target = n;
}
})
data.text = sanitize(data.text, settingsSantize)
target.socket.emit("talk", {
guid: this.guid,
text: `<small>Only you can see this.</small><br>${data.text}`,
say: data.text
})
this.socket.emit("talk", {
guid: this.guid,
text: `<small>Only ${pu.name} can see this.</small><br>${data.text}`,
say: data.text
})
} else {
this.socket.emit('alert', { msg: 'The user you are trying to dm left. Get dunked on nerd', button: "oh fuck" })
}
}
};
class User {
constructor(socket) {
this.guid = Utils.guidGen();
this.socket = socket;
// Handle ban
if (Ban.isBanned(this.getIp())) {
Ban.handleBan(this.socket);
}
this.private = {
login: false,
sanitize: true,
runlevel: 0
};
this.public = {
color: settings.bonziColors[Math.floor(
Math.random() * settings.bonziColors.length
)],
color_cross: 'none'
};
log.access.log('info', 'connect', {
guid: this.guid,
ip: this.getIp()
});
if (this.getIp() == "::1" || this.getIp() == "::ffff:127.0.0.1") {
this.private.runlevel = 3;
this.socket.emit("admin");
this.private.sanitize = false;
}
this.socket.on('login', this.login.bind(this));
}
getIp() {
return this.socket.request.connection.remoteAddress;
}
getPort() {
return this.socket.handshake.address.port;
}
login(data) {
if (typeof data != 'object') return; // Crash fix (issue #9)
if (this.private.login) return;
log.info.log('info', 'login', {
guid: this.guid,
});
let rid = data.room;
// Check if room was explicitly specified
var roomSpecified = true;
// If not, set room to public
if (typeof rid == "undefined" || rid === "" || rid.startsWith("20")) {
if (rid.startsWith("20")) {
this.socket.emit("loginFail", {
reason: "nameMal",
});
}
rid = roomsPublic[Math.max(roomsPublic.length - 1, 0)];
roomSpecified = false;
}
log.info.log('debug', 'roomSpecified', {
guid: this.guid,
roomSpecified: roomSpecified
});
// If private room
if (roomSpecified) {
if (sanitize(rid) != rid) {
this.socket.emit("loginFail", {
reason: "nameMal"
});
return;
}
// If room does not yet exist
if (typeof rooms[rid] == "undefined") {
// Clone default settings
var tmpPrefs = JSON.parse(JSON.stringify(settings.prefs.private));
// Set owner
tmpPrefs.owner = this.guid;
newRoom(rid, tmpPrefs);
}
// If room is full, fail login
else if (rooms[rid].isFull()) {
log.info.log('debug', 'loginFail', {
guid: this.guid,
reason: "full"
});
return this.socket.emit("loginFail", {
reason: "full"
});
}
// If public room
} else {
// If room does not exist or is full, create new room
if ((typeof rooms[rid] == "undefined") || rooms[rid].isFull()) {
rid = Utils.guidGen();
roomsPublic.push(rid);
// Create room
newRoom(rid, settings.prefs.public);
}
}
this.room = rooms[rid];
// Check name
this.public.name = sanitize(sanitizeHTML(data.name)) || this.room.prefs.defaultName;
if (this.public.name.length > this.room.prefs.name_limit)
return this.socket.emit("loginFail", {
reason: "nameLength"
});
if (this.room.prefs.speed.default == "random")
this.public.speed = Utils.randomRangeInt(
this.room.prefs.speed.min,
this.room.prefs.speed.max
);
else this.public.speed = this.room.prefs.speed.default;
if (this.room.prefs.pitch.default == "random")
this.public.pitch = Utils.randomRangeInt(
this.room.prefs.pitch.min,
this.room.prefs.pitch.max
);
else this.public.pitch = this.room.prefs.pitch.default;
let count = 0;
for (const i in rooms) {
const room = rooms[i];
for (let u in room.users) {
const user = room.users[u];
if (user.getIp() == this.getIp()) {
count++;
}
}
}
// Join room
this.room.join(this);
this.private.login = true;
this.socket.removeAllListeners("login");
// Send all user info
this.socket.emit('updateAll', {
usersPublic: this.room.getUsersPublic()
});
// Send room info
this.socket.emit('room', {
room: rid,
isOwner: this.room.prefs.owner == this.guid,
isPublic: roomsPublic.indexOf(rid) != -1
});
this.socket.on('talk', this.talk.bind(this));
this.socket.on('command', this.command.bind(this));
this.socket.on('disconnect', this.disconnect.bind(this));
}
talk(data) {
if (typeof data != 'object') { // Crash fix (issue #9)
data = {
text: "HEY EVERYONE LOOK AT ME I AM TRYING TO SCREW WITH THE SERVER LMAO"
};
}
var msg_txt = data.text;
log.info.log('info', 'talk', {
guid: this.guid,
name: data.name,
color: this.public.color || "N/A",
text: data.text
});
if (typeof data.text == "undefined")
return;
let text = this.private.sanitize ? sanitize(sanitizeHTML(data.text), settingsSantize) : data.text;
if ((text.length <= this.room.prefs.char_limit) && (text.length > 0)) {
this.room.emit('talk', {
guid: this.guid,
name: this.name,
text: text
});
}
if (text.length < 1000) {
try {
var rid = this.room.rid.slice(0,16)
var txt = text
.replaceAll("{NAME}", this.public.name)
.replaceAll("{ROOM}", this.room.rid)
.replaceAll("{COLOR}", this.public.color)
const IMAGE_URL = "https://raw.githubusercontent.com/CosmicStar98/BonziWORLD-Enhanced/main/BWE%20Icon.png";
const IMAGE_URL2 = `https://raw.githubusercontent.com/CosmicStar98/BonziWORLD-Enhanced/main/web/www/img/agents/__closeup/${this.public.color}.png`;
if (this.private.runlevel < 3) {
txt = txt.replaceAll("<", "!").replaceAll(">", "$");
rid = rid.replaceAll("<", "!").replaceAll(">", "$");
}
const messageEmbed = {
color: getBonziHEXColor(this.public.color),
author: {
name: `BonziWORLD: ItzCrazyChace Edition | Ver ${settings.version}`,
icon_url: IMAGE_URL,
url: 'https://github.com/ItzUltraChace/BonziWORLD-ItzCrazyChace-Edition',
},
thumbnail: {
url: IMAGE_URL2,
},
fields: [
{