A networked chat system written in Java.
The BashTalk network consists of multiple client applications connected to a single central server. These instructions cover setting up a client. Further instructions on setting up a server and creating a network can be found below.
- Download latest version of BashTalkClient.zip from the build folder of this repository. (link needed)
- Extract the files.
- Inside the extracted folder, run client.bat (Windows systems) or client.sh (Mac or Unix-like systems) These files run the command:
java -jar BashTalkClient.jar
- After running the jar file, a login interface will appear.
- In the respective fields, enter a personal username, the IP address of the desired BashTalk server, and the port on which that server is listening.
- Upon connection and validation of the username, a welcome message, any cached messages, and a list of active users will appear.
- From here, chatting can begin!
If you don't already have Java installed, please download and install it from Java's download page.
If you already have Java installed and are not able to run the client, try following the steps provided by this article on adding Java to your PATH variable (Windows). This problem does not usually present itself to Mac or Linux users, but in the case that it does, this article by Oracle includes more advanced instructions for most versions of Windows, Mac, and Linux.
BashTalk syntax is very simple and similar to that of many IRC clients. Commands always start with the "/" character followed by the necessary arguments. As a template,
/command argument1 argument2
would be the form of a typical command. The following commands can currently be used.
List the usernames of all users currently logged into the server.
/users
Send a private message to a logged-on user. This command DOES NOT create a private channel. In order to have a private conversation, the /pmsg command must be used at the beginning of every message between the two clients.
/pmsg <recipient> <message>
/pmsg fakeUser0 Howdy there.
/pmsg fakeUser1 Got eeeeem!
Mute a user on the server. The user is still allowed to private message.
/mute annoyingPerson1
[00:00] <peaceAndQuiet> muted <annoyingPerson1>.
Unmute a user on the server.
/unmute lessAnnoyingPerson2
[00:00] <forgivenessIsKey> unmuted <lessAnnoyingPerson2>.
Clear all content from the local display. This will not clear messages on other user's displays or on the server.
/clear
Logout of the server and close the client application.
/exit
The active users on the server will be notified, but the notification will not be cached or visible to users who log on in the future.
To run successfully, these commands require password authentication.
Take care to read the server's instructions as entering the password at the wrong time could result in it being broadcast to the entire group. Character typed into the message field will be replaced with *'s when it is safe to send a password.
Remove a user from the current session. The group is notified that the user has been removed.
/ban reallyAnnoyingPerson
[00:00] <# server #> Enter password:
thisIsTheWrongPassword
[00:00] <# server #> Authentication failed.
/ban reallyAnnoyingPerson
thisIsTheRightPassword
[00:00] <reallyAnnoyingPerson> was banned from the server.
Clear the server's message history. While the server's message cache will be cleared for future users, active user's screens will not be cleared. Until a user logs out or calls /clear on their own screen, they will still be able to see their screen history.
/clear_cache
[00:00] <# server #> Enter password:
thisIsTheWrongPassword
[00:00] <# server #> Authentication failed.
/clear_cache
thisIsTheRightPassword
[00:00] <# server #> Cache cleared.
The BashTalk server is the centerpiece (literally) of the entire network. Without a working server, each client is useless. Initially setting up the server is very similar to setting up the client.
- Download latest version of BashTalkServer.zip from the build folder of this repository. (link needed)
- Extract the files.
- Inside the extracted folder, run server.bat (Windows systems) or server.sh (Mac or Unix-like systems) These files run the command:
java -jar BashTalkServer.jar
- After running the jar file, the server will display its address and port information.
- Users can now connect using this information.
Got the server up? Take it for a spin locally.
- Run the client on the same computer as the server.
- Connect using the address 127.0.0.1 and the port 9898.
- The server should indicate a successful join.
To consistently connect to the server, ensure that its IP will not change. This can be achieved through DHCP Reservation, Static IP assignment, or simply never turning the server off.
If both the server and client are on a shared local network (i.e. a simple one-router home network), clients can connect using the information listed under "Local:" on the server boot screen.
Connecting from the world outside a local subnet requires exposing the server to that world. This exposure can be exploited. Please be careful.
- Locate the network router's configuration settings (try visiting 192.168.1.1 or 192.168.1.254 in a web browser).
- Configure the router to forward port 9898 of the BashTalk server to an outside port (can be any port not already in use).
- Connect to the server using the "External: " IP address from the server boot screen as the address and the port number to which you forwarded 9898 as the port.
A shortcut to launch either the client or server can be created and copied on a Windows computer.
- Copy the path to the BashTalk(server/client).bat file.
- Right click on the Desktop.
- Select New -> Shortcut from the context menu.
- Paste the full path to the BashTalk(server/client).bat file.
- Select Next, name the shortcut, and click Finish.
- Copy the shortcut to the desired location. Copying the shortcut to the path below, for example, will add BashTalk to the Start Menu program list.
C:\Users\thisIsAWindowsUsername\AppData\Roaming\Microsoft\Windows\Start Menu\Programs