JChat Version: 0.9
ANYTHING IN RED IS NOT ACTUALLY CODED YET BUT IS ON MY TO-DO LIST!
Will Record a Video at some point
Introduction
After seeing This, I took the much needed inspiration and made an OS. However, D3C and I decided to make a chat system. Although we never really got anywhere with it, I decided yesterday to try and make another one. So, I ended up with this. At some point, I hope to integrate it into my OS.
Since I have only worked on this for ~3 hours (not constantly), it is definitely not finished, but this is the first version I have produced and it has all the basic features of a chat program, so I decided to post it here.
Before I release it, I'd like to implement a few more commands and perhaps tweak and optimize some of the Client-->Server-->Client stuff.
Description
The Chat System consists of a Server, and multiple Clients. Each client communitcates with the Server, which then deals with the Client's request or message. The Server can also be directly controlled, and can be used to send commands to users or manage various features on the System. When a Client sends a message, the message is processed by the server and sent to each client. (Although not implemented yet, this could also be used to send commands and requests to the server). When a Client executes a command, if the command is Clientside, no information is sent and information stored on the Client's machine is displayed. If the command is Serverside (e.g. sending a special message), a request is send to the server, which then deals with the request and sends information back. When the Server is used to send information to a client, a command is sent which is run on the Client.
Future Plans (To-Do)
1. ADD MORE COMMANDS! At the moment, there are not very many features on the system, but I really need some inspiration to think of what else to code into it! (Suggestions welcome!)
2. Special Messages - Shouting, Announcing, Whispering to another Client, whatever other stuff I (or you) can come up with.
3. Client --> Server requests. At the moment, information requested by the Client can only be displayed if it is on the Client's E2. The facility is there to send information from the Server, but I haven't got round to coding it yet.
4. Games? - It might be cool to allow users to play some kind of game over the Network. However, this will probably come later, since there's more basic stuff that could be in there first.
5. Some fun stuffViruses, and suchthelike
6. Code a couple of E2 commands to make writing the code a LOT easier!
7. More stuff that hopefully other people will suggest. For now, I've run out of inspiration.
How it works
Client
To each client is connected a Console Screen, via Wirelink, and a Keyboard. It also has two inputs from the server, an input for text from the Server, from other clients, and one for commands to be run on it by the server. It outputs only text sent by the Client. It also stores the Client's nickname and the ClientID. The ClientID is set via Global Variable at the start.
When the user presses enter, the system checks to see if the first character of the Client's message is "!" (the command prefix character). If it is, it checks to see if the command that the user entered is a valid command. If so, it executes this command, and if not, it tells the Client that their command was not valid. If the first character was not "!", the Client sends it's message to the server, which then sends it to the other clients.
When a client receives a message, it prints it to the screen.
When a client recieves a command from the server, it first checks to see if the command is valid. If the command is not valid, it sends a message back to the server, checking the version of the Chip (that command might not have been added yet), and telling the server that the command could not be run. If the command is found, it runs the command.
Server
To the server is connected a Console Screen, via Wirelink, and a Keyboard. It has an input from each Client. It outputs a String to each client, and a Command string, which is used to send commands to Clients for their machines to run.
Currently, a server supports four clients.
A server can execute commands on Clients. This either takes the form of setting a Variable on a Client's Machine (e.g. Mute, stopping the user from speaking), or physically Running a command on the Client's Machine. In the former case, the command is sent through the command output, and is received by the Client. It then processes the Servers request and sets the required Variable.
In the latter case, the command is run as if the Client had typed it. It works similar to the !cexec ULX command, and is useful for managing Clients.
Client Commands
Code:!clear - Clears the Client's Screen !help - Displays the Client Help !me - Shows the Client's Name and ID !name <string> - Sets the Client's Nickname to the String !say <string> - Mainly used for !exec Server commands, this is un-needed by the Client
Server Commands
Code:!clear - Clears the Server's Screen !help - Displays the Server Help !mute <num> - Mutes the ClientID <number> !exec <num> <string> - Executes the Command <string> on the Client <number>
Pictures
Full Gallery Here
The Client Machine. Screen, Processor and Keyboard.
Basic Commands.
Sending and receiving messages and muting.
Remote execution from the Server
Check out the gallery for the rest
Special Thanks
d3cr1pt0r - Thanks for the inspiration
Black Phoenix - The Documentation for the devices was veeeery helpful
The Wire Team - THANK YOU SO MUCH!


LinkBack URL
About LinkBacks

Viruses, and suchthelike 







Reply With Quote










Bookmarks