CLIChat - Chat rooms for the command line with no signups by sudocode1 & 1s3k3b.
Our official CLIChat server: 188.165.82.203:90
More pages
- Download the source code
- Download and Install Node.js
- Locate to
/<clichatdir>/client
- Run
npm i
(first time only) and thennode index.js
If you want to host a secure server, look at the secure-server readme.
Download the source code, navigate to /<clichatdir>/server
and edit index.js
, there are two options near the top of the file:
// set the ports you want to host on if you need multiple servers
const ports = [90];
// set the words you want to filter from usernames and messages
const filter = ["the words you want to filter", "go here"];
If you want to host multiple servers, add more ports to the ports
array.
The filter should have the words you want to filter from usernames and chat.
To start the server, run npm i
(first time only) and then node index.js
Writing a custom client or bot is quite simple (completely different for secure servers).
There is an official API wrapper made for Node.js: clichat.js.
You can also make your own API wrapper by utilising this list.
- Everything uses pure WebSockets & JSON.
- Connect to the server using
['auth', {ip, username}]
(IP is not currently used at all) - Messages should be sent as
['msg', {idOfUser, messageContent}]
- Messages are recieved as
['message', {username, messageContent}]
- A user disconnect is recieved as
['disconnect', username]
- A user join is recieved as
['join', username]
- You joining the room is recieved as
['id', yourID]
- A server refusal is recieved as
['refusal', refusalString]