- C++ 95.9%
- CMake 4.1%
| src | ||
| .clang-format | ||
| .clangd | ||
| CMakeLists.txt | ||
| example.config.yml | ||
| README.md | ||
Jay
Customizable XMPP bot
Dependencies
- CMake ≥ 3.10
- pkg-config
- gloox
- yaml-cpp
- Boost (log, log_setup, thread)
- libuuid
- libresolv (glibc; optional on libcs that provide
res_queryin libc)
Building
The following is an example, feel free to customize
mkdir build
cp example.config.yml build/config.yml
cd build
# edit config.yml as you please
cmake ..
cmake --build .
./jay config.yml # to run the app with the config
Commands
All commands start with / followed by the module alias:
/actor list
/publish dialog
/chat join room@conference.example.org
In a MUC, address the bot first with its room nickname:
BotNick: /actor list
The bot replies in the room mentioning you back (YourNick: …). Whispers to the bot are answered as whispers. Messages that are not commands (no leading /) are ignored for now, except while a module dialog is active (cancel or /cancel aborts it).
Unknown / commands always get a reply (unhandled / forbidden / …) in both 1:1 and MUC.
Modules
Actor
This module is designed to manage access to Bot.
Commands:
- /actor list: lists all known actors
- /actor set
actorgroup: assigns a group to an actor.defaultis a special actor name, group from it is assigned to all new actors, not listed inactorssection of config
Publish
This module enables bot to publish to PubSub nodes
Commands:
- /publish to
node@servicetitle\narticle: Publishesarticleto thenodeof theservice - /publish dialog: opens an interactive dialog to do the same thing command
todoes
Chat
Joins and leaves multi-user chats. Room membership is stored under the module’s rooms section in the main config (runtime changes rewrite the file). On connect the bot joins exactly those rooms from a clean local state.
Default nickname is the bot login (localpart of jid) when nick is omitted.
When a MUC does not expose an occupant’s real JID, that user is treated as actors.default and a warning is logged.
Commands:
- /chat join
room@conference…[nick]: join and persist the room - /chat leave
[room@conference…]: leave and remove from config (room optional in a MUC — leaves the current room) - /chat list: list configured rooms
Optional replies.join / replies.leave lists announce in the room after joining / before leaving (omit or empty to stay silent).
Permission: manage
Notes
- 1:1 replies lock onto the peer’s full JID after they speak (RFC 6121 §5.1).
/text commands are a Jay convention; XEP-0050 Ad-Hoc Commands are not used yet.- Disco identity is
client/bot.