This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
jay5476's profile picture

A Simple Chat Program

Started by jay5476, 09 August 2013 - 09:31 PM
jay5476 #1
Posted 09 August 2013 - 11:31 PM
I have created a simple chat program were 2+ people can chat, its easy to use and uses the parallel API so a server is not needed

how to use:
Download the code using pastebin get suFTTeu8 chat on you computer
Run chat, enter a username that doesn't use '|'
Chat away.

Cool features:
You can talk in colour by including &amp;<number(0-9)> color codes found under colour api on the wiki
more coming soon

web address: pastebin.com/suFTTeu8

leave feedback in comments
DSlink2010 #2
Posted 11 August 2013 - 07:14 PM
Excuse me but why did you remove the pastebin?
jay5476 #3
Posted 12 August 2013 - 01:29 AM
oh if you checked the first pastebin is correct I miss typed the pastebin it will be changed btw its : suFTTeu8
DSlink2010 #4
Posted 12 August 2013 - 03:03 PM
oh if you checked the first pastebin is correct I miss typed the pastebin it will be changed btw its : suFTTeu8

Warning: Pretty long post.

Oh. I see that it uses rednet.broadcast? That's not very good. It'll be extremely easy to flood the chat/flood other rednet stuff. You should make a installation program that allows you to choose from client or server. And then it saves the server id to a file, and if the file exists, it won't be changed. Other than that it's good. Also you should make it substring the last char from the name and check if it's a " | " then if it is then make the player redo the name, if it isn't then don't do anything to the name. Also, to make the server id file more secure, use a encrypting function to encrypt it, then decrypt it if you need to send anything from client to server.
jay5476 #5
Posted 12 August 2013 - 05:45 PM
yes rednet.broadcast can be flooded I think on login ill make it save ids when joins and only receives from those :)/>