_
_ __ (_)__ _ _ _
| ' \| / _` | || |
|_|_|_|_\__,_|\_,_|
It's not a work of art as of now, since it only is in the alpha stages, but it's gonna get better as time goes by. For support join server ilovefemboys.duckdns.org (may be unactive) or dm maybe.asdf on discord.
- Some day.. maybe some day.. w*nd*ws sucks anyways
- First install git, which i assume you already have
- Clone this repo by running this command
git clone https://github.com/maybe-asdf/chaasnyx/
- CD into the cloned repo, and run
python3 -m venv venvthensource venv/bin/activateand finallypip install -r requirements.txt. - Now do
./client.sh. (if that doesnt run trysource venv/bin/activatethen `python3 scripts/client.py)
- First install git, which i assume you already have
- Clone this repo by running this command
git clone https://github.com/maybe-asdf/chaasnyx/
- CD into the cloned repo, and run
python3 -m venv venvthensource venv/bin/activateand finallypip install -r requirements.txt. - Now do
./server.sh. (if that doesnt run trysource venv/bin/activatethen `python3 scripts/server.py)
- More details on this can be accessed on probably your router providers website, but for the service to be accessed outside of your home network you need to forward port 6741 by default.
- Commands [✅]
- Whisper [✅]
- Chat history [✅]
- Role system [✅]
- Transport Encryption (WSS) [✅]
- Passwords for privileged usernames [✅]
- Plugin system [✅] (you can see example plugins in the plugins/ folder)
- Web UI [broken] (maybe vibecoded but who cares) (also probably a security risk)
Chaasnyx implements a simple role permission system. The three available roles are:
admin: Full administrative control (stopping the server, clearing server logs).mod: Channel moderator control (kicking users, clearing screen).user: Standard participant.
Run these command utility options on the server using Python:
- Add or Update a User:
python3 scripts/server.py --add-user <username> --role <admin/mod/user>
- Delete a User:
python3 scripts/server.py --delete-user <username>
- List All Registered Users:
python3 scripts/server.py --list-users
>stop: Stops the chat server (Admins only).>clearhistory: Clears stored message history on the server database (Admins only).>kick <username>: Disconnects the selected user immediately (Admins & Moderators only).>clearscreen: Signals all active clients to clear their screen layouts (Admins & Moderators only).>list: Shows a list of all active online users.>msg <username> <message>: Sends a private whisper to the target user.
The chat server includes a dynamic plugin scanner. All plugin files are placed in the plugins/ directory and loaded on server startup.
Plugins must subclass ServerPlugin from scripts/plugin_base.py. Developers can override the following event hook signatures:
from plugin_base import ServerPlugin
class MyPlugin(ServerPlugin):
async def on_join(self, username, websocket):
"""Called when a user logs in."""
pass
async def on_leave(self, username):
"""Called when a user disconnects."""
pass
async def on_message(self, username, message_content, websocket) -> bool:
"""Called when a text message is sent. Return True to block/consume it."""
return False
async def on_command(self, username, command, args, websocket) -> bool:
"""Called on commands starting with '>'. Return True to block/consume it."""
return FalsePlugins can target how outputs are displayed:
- Server console: Use standard
print()functions in the plugin code. - Single Client (Local): Send messages directly to the client's
websocketparameter. - All Clients (Global): Loop over
self.server.clientsto broadcast content.
By utilizing the "raw": true JSON parameter, server plugins can bypass standard chat bubbles and render custom ANSI graphics/panels on compatible terminals natively.
- Example Plugin (
plugins/example_plugin.py): Demonstrates intercepting custom commands (>localbox&>globalbox) and drawing borders and layouts. - Anti-Spam Plugin (
plugins/antispam.py): Automatically blocks messages and mutes users for 10 seconds if they send more than 5 messages within 3 seconds.