Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
integration shoutbox in cc6? any idea?

misterpaint
Registered User
Quote
2022-09-14 15:58:25

I must to insert a mini chat or a shoutbox in my cc6 project. Have any of you ever done it? Also ... do you know any free services or free scripts for mini chat or shoutbox?

thx


just_in_case
Moderator
Quote
2022-09-15 08:47:15

This can be possible, @Rolevix, has already created a multiplayer chat lobby for one of his project, so yeah, it is possible to create a shoutbox for your game, it requires scripting though and a server to host the Shoutbox.


rolevix
Registered User
Quote
2022-09-15 15:47:39

@just_in_case
one of "her" project :3

@misterpaint
You can check this project from time to time, in one of the future updates I plan a small integration of social features, including my improved chat with split channels:
Link - https://vish.itch.io/tales-of-mi...


okeoke
Registered User
Quote
2022-09-15 15:51:18

Hi @misterpaint

Definitely possible.
As just_in_case mentioned you will require some sort of server to exchange the data and minimum two scripts: to send data and get/parse data from the server.

Probably, you can also host the server for free if use heroku or glitch.

If no one helps you till weekends, please update the topic I'll try to make a tutorial or at least some sort of demo - this is actually a fun project to make. Also, does this mini chat should have channels or it's just a global chat?


just_in_case
Moderator
Quote
2022-09-15 16:30:45

@rolevix Sorry, I wasn't aware you are female. Glad to know that you are still working on your Chat integration and improving it.

@okeoke, You should definitely create it, don't wait for someone else to help, meanwhile, if someone posts a demo or something then you can still post your version, the more the better.


okeoke
Registered User
Quote
2022-09-18 15:01:48

@misterpaint please find the video in the announcements section: https://www.ambiera.com/forum.php?t=10740


Robo
Guest
Quote
2022-10-02 04:20:53

I saw your youtube video about this 'okeoke' - really great, thanks for that. I think I will add this to my game Alien Revenge as a test run for maybe my main game Saturn 7 later on...


misterpaint
Registered User
Quote
2022-10-02 11:26:59

thx to all!!! very very kind all :)


Robo
Guest
Quote
2022-10-05 01:48:20

Does the CopperCube API for sending requests check internet connectivity to start with and how would we display if not connect ?

Can anyone hack that system at all by sending through 'eval' JavaScript or other similar commands ?


okeoke
Registered User
Quote
2022-10-05 11:00:56

I think current implementation is pretty much safe.

You can run into the issue if someone finds the way to change the chatlog file on the host machine. On the host I don't parse any strings I receive with the code, instead json_encode/json_decode, and array push are used. So in case object type of chatlog content is not array, everything should fail on step there the hacked message is added to the code. And until you receive an array, everything should be safe.

In order to hack this system you need get a direct write access to the chatlog file. So basically, you need to get access to the filesystem by ftp or be able to modify it via the "add new message" script. Both ways don't seem like an easy thing to do.

Overall, I believe, current implementation is pretty safe. But in case you want to play it safer you can change the following:

var msgsArr = eval('(' + data + ')'); 


to

var msgsArr = []; 
var slices = data.slice(1, -1).split(',');
for(var i = 0; i < slices.length; i++) {
msgsArr.push(slices[i].slice(1, -1));
}


Which does pretty much the same without using eval.

I mean, coppercube can read your files content and then send it to the Internet. Any game you download from the forum can potentially steal your data even without using eval:)

Thank you for mentioning it, I'll add this comment to the video.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Intern?tional" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact