Skip to content

heyitswither/template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 

Repository files navigation

Netscape Chat Communication Information

Future Proofing your Client

In case you want to have your client updated and ready before the server makes changes, the specification containing current future plans can be found here.

Authentication

Send this message when first opening the server connection to authenticate with the server

{"password":"your password","author":"your username"}

If this is your first time authenticating with a username and it has not yet been registered, you will receive this message

{"type":"auth","message":"You have successfully registered a new account and logged in"}

If you have logged into a registered name with incorrect credentials, you will receive this message and will not be able to send messages

{"type":"auth","message":"Those credentials are incorrect"}

If you have logged into an already existing account, you will receive this message

{"type":"auth","message":"You have successfully authenticated an already existing account"}

Chat Messages

Messages from the server will be in this format

{"author":"chaten","type":"message","message":"hi"}

Messages to the server should be in this format (They should NOT include an author string: This is disregarded by the server and replaced with the username you have authenticated with)

{"type":"message","message":"hi"}

Private Messages

To send a private message to another user, you must send a message like this

{ "type": "direct_message", "recipient": "recipients_username", "message": "authors_message" }

When you receive a private message, your client will be sent a message like this

{ "type": "direct_message", "author": "author_username", "message": "authors_message" }

Status

If a user joins, you will receive a message like this

{"type":"join","message":"username"}

If a user quits, you will receive a message like this

{"type":"quit","message":"username"}

Managing an Online List

When you connect to the server, you will receive a message like this containing the list of online users

{"type":"user_list","users":["folder","zachary","stalin"]}

This can be used to create your online user list, which you can update in realtime based on join and quit packets.

About

A template Sphinx repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published