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

[HTTP] PSChat Reloaded | Now with titles

Started by minizbot2012, 18 January 2015 - 08:56 PM
minizbot2012 #1
Posted 18 January 2015 - 09:56 PM
Chat over the interwebs in CC

Original thread here: http://www.computerc...-the-interwebs/

Now on Google App Engine
version 3.0 (it works for any recent versions) installer

pastebin get hyNxvCHZ ProgramName

Commands
Spoiler/me - example /me likes to ressurect my old programs once in a while
/nick - changes your nickname
/version - displays version
/ping - returns a pong to you from the server
/swapServ - changes server; the default server would be /swapServ http-chat-serv.appspot.com/post http-chat-serv.appspot.com/get
/swapChannel - changes channel default is "main" - example /swapChannel main
/update - updates your client
/exit - exits the program
and finally the /server command, this is used by admins to do stuff like adding channels and sending raw client data, this can also add Admin passwords to the system, or have the server say something

Finally, the server will be up 24/7 due to the new server software being written on the webapp2 framework in python on google's App Engine. Since this is totally rewritten server software and the server supports changing servers, if you want to host you own on google's app engine, it can be provided, free of charge.

Server software Github:

https://github.com/M...12/PSChatServer

Developers over time:

svdragster - orignal developer passed down to MudkipTheEpic
MudkipTheEpic - previous developer passed to me
me - current developer
Edited on 23 August 2015 - 09:59 PM
LDDestroier #2
Posted 19 January 2015 - 01:36 AM
Neat idea. I'll go check it out as soon as I can.
LDDestroier #3
Posted 23 March 2015 - 03:56 PM
It's been a few months, I found this again, and I have determined that you are awesome. The program works under ccemuredux! Nice job! Please send updates!

Suggestions:
1: It's be awesome if there were a rednet-to-http proxy program to make an otherwise rednet application work over infinite distance!
2: Please make a color version of pschat, it appears to be black and white on an advanced computer.
Edited on 23 March 2015 - 02:58 PM
minizbot2012 #4
Posted 27 March 2015 - 11:38 AM
I hope it works under ccemuredux, that's what i made it on! As for color, I forgot to put this is documentation, however, if you use #<Hexcode> (0 - F)(0 is white, F is black) will set the background to a color or if you use $<Hexcode> (lose the angle brackets) it will set the text color. I have also made a few changes to the server that are not yet uploaded to App Engine.

Edit (1): Changes that I made are now up on the server, no client updates as of yet.

I have thought about doing a rednet-http proxy before and just decided not to, and it won't be infinite distance it would be cross-server. With the backend and skills I have now with lua, python and App Engine, that might become PSRedHttp.
Edited on 27 March 2015 - 10:59 PM
LDDestroier #5
Posted 28 March 2015 - 10:26 PM
I have thought about doing a rednet-http proxy before and just decided not to, and it won't be infinite distance it would be cross-server. With the backend and skills I have now with lua, python and App Engine, that might become PSRedHttp.

A rednet/http proxy would be slow, sure, but it would be incredibly useful for chats or file transfers. Please work on it, and if you can, have it both work in the background AND take in other rednet signals (from pocket comps) and send that too.
minizbot2012 #6
Posted 29 March 2015 - 03:03 AM
Wish Granted

http://www.computerc...http-psredhttp/

Edit:

An update on this, I am working on this, its just stuff that you don't notice very easily.
Edited on 26 April 2015 - 08:53 PM
minizbot2012 #7
Posted 23 August 2015 - 11:58 PM
{UPDATE}

To celebrate me becoming the Resident Necromancer, I have updated the server with something I've been planning, TITLES! And before you ask, yes I have added the title Res. Necro on this program for myself until I lose it, then whoever gains it next can then gain it within PSChat, and everyone will know who you are!
LDDestroier #8
Posted 13 September 2015 - 02:30 AM
Hey miniz! I modified pschat to work with chatboxes from MoarPeripherals. With it, players can talk to one another across servers as if they were connected to said servers. pastebin get cKmEV1HC

EDIT: Woops, screwed up the link. It's all good now.
Edited on 13 September 2015 - 07:58 PM
PokeAcer #9
Posted 14 September 2015 - 04:48 PM
Awesome! As per usual, I am wondering if you are encrypting this in any way - maybe connect to the server on each connect, and it gets a random string from thin air and hashes it, so that each connector can use AES for it :P/>
LDDestroier #10
Posted 14 September 2015 - 06:55 PM
Awesome! As per usual, I am wondering if you are encrypting this in any way - maybe connect to the server on each connect, and it gets a random string from thin air and hashes it, so that each connector can use AES for it :P/>
From me tinkering with is, what I know is a client does a post() call, and that text appears on the screen.
PokeAcer #11
Posted 15 September 2015 - 05:56 PM
Awesome! As per usual, I am wondering if you are encrypting this in any way - maybe connect to the server on each connect, and it gets a random string from thin air and hashes it, so that each connector can use AES for it :P/>
From me tinkering with is, what I know is a client does a post() call, and that text appears on the screen.
Sounds VERY similar to a program designed for 3DS (homebrew)
minizbot2012 #12
Posted 19 September 2015 - 10:46 PM
hmm, encryption eh, that would require a lot of rewriting, PokeAcer. There has some internal rewriting that has gone into this without a release for a while. LDD, was your client the one that did <Name>: message? And might I ask you ldd to remove the part where it loads the password into the local var? Also if you mess with the slines variable you can get the server to return the previous slines of the chat btw, for a client like that I'd say 2-3 is good for printing the latest line, plus it would reduce the load on the server, and traffic.


The only issue I see with encryption, is that when the message goes from one to another, how would the other figure out the key to decrypt?

AKA if it wasn't clear, no there is not encryption

Also if you can go ahead an pop on, i'll be glad to discuss the the protocol that is being used.


EDIT:

A little update to this, I implemented java's hashCode function for strings in lua, it is used for passwords (its a bit more secure atleast than plaintext).
Edited on 19 September 2015 - 09:48 PM
LDDestroier #13
Posted 30 November 2015 - 01:25 AM
I was messing with PSChat in my chatbox mod of it, and slines didn't appear to do a damn thing. lastget == get! Is this a bug?
minizbot2012 #14
Posted 01 December 2015 - 07:28 PM
hmm lemme look at the code, I may have actually deprecated that variable on the server. If slines is ignored it is in-fact a bug.

Edit: My formula for the range might have been a bit off, I've uploaded a new server version to production server; See if it works now.
Edited on 01 December 2015 - 06:45 PM
LDDestroier #15
Posted 01 December 2015 - 10:25 PM
I don't believe you fixed it yet. I modified the source code to have 'get' use slines=10, and 'lastget' use slines=1. They were identical.
minizbot2012 #16
Posted 01 December 2015 - 11:07 PM
hmm, can you post some code, I have no issues on my end, (with my debugging stuff) is it being sent as a header?
LDDestroier #17
Posted 02 December 2015 - 12:28 PM
Yes, it is being sent as a header. Like this:

http.get(getLink, {slines=1,whatever=stuff...})
minizbot2012 #18
Posted 02 December 2015 - 07:38 PM
Woah, When testing in an emulator it seems that it needs to be sent as a string…. this does make any sense at all, umm try sending it as a string or convert it with tostring?

I am also going to investigate further as to what going on here…
Edited on 02 December 2015 - 06:39 PM