MUD on Urbit

Clan System

design

Status: Design Date: 2026-04-04

Persistent player-run organizations with admin-approved creation, clan halls, and rank-based moderation. Per-world only — no cross-world clans.

Creation Flow

  1. Citizen types clan create <name>
  2. Request added to a pending queue
  3. Admin sees pending requests on the admin dashboard
  4. Admin clicks “Approve” — system creates the clan, creates a pre-configured clan hall room, and redirects admin to the editor with the new room selected
  5. Admin places the room in the world
  6. Requester becomes clan leader, gets clan:<name> player flag
  7. If admin clicks “Deny”, request is removed and requester is notified

Clan names are permanent — cannot be changed after creation. Citizens only (guests cannot create or join clans). One clan per player.

Clan Hall

A room with clan=(some '<clan-name>') on the room type. The movement handler blocks entry for non-members:

“This is a private clan hall. Members only.”

The room is auto-created on approval with:

  • Name: <Clan Name> Hall
  • Description: The private hall of the <Clan Name> clan.
  • Flags: %indoors, %safe, %no-mob
  • clan=(some '<clan-name>')
  • No exits (admin connects it in the editor)

Admins can add more rooms to a clan hall by setting the clan field on additional rooms. This is a future revenue model — clans pay the world admin for room expansions.

Ranks

RankPermissions
LeaderInvite, kick, promote, demote, disband, set MOTD
OfficerInvite, kick
MemberChat, access clan hall

Only one leader. Leader can promote members to officer and demote officers to member. Leader can transfer leadership with clan transfer <player>.

Commands

CommandDescription
clanShow your clan info (name, rank, members online, MOTD)
clan create <name>Request clan creation (citizen only)
clan invite <player>Invite a player (leader/officer)
clan acceptAccept a pending clan invite
clan declineDecline a pending clan invite
clan kick <player>Remove a member (leader/officer, cannot kick higher rank)
clan promote <player>Promote member to officer (leader only)
clan demote <player>Demote officer to member (leader only)
clan transfer <player>Transfer leadership (leader only)
clan leaveLeave the clan (leader must transfer first)
clan disbandDisband the clan (leader only, removes all members)
clan motd <text>Set clan message of the day (leader only)
clan chat <msg> / cchat <msg>Send message to all online clan members

State

New type

+$  clan
  $:  name=@tas
      display-name=@t
      leader=@t
      officers=(set @t)
      members=(set @t)
      motd=@t
      hall-room=room-id
      created=@da
  ==

+$  clan-request
  $:  player-name=@t
      player-ship=@p
      clan-name=@t
      requested=@da
  ==

Members are stored by character name (@t). The leader is also in members. officers is a subset of members.

State additions

clans=(map @tas clan)
clan-requests=(list clan-request)
clan-invites=(map @t @tas)   :: player-name -> clan being invited to

Player flags

When a player joins a clan, they get the flag clan:<clan-name>. This flag:

  • Gates access to clan hall rooms
  • Is used by clan chat to find the player’s clan
  • Persists across sessions for citizens

Admin Dashboard

Add a “Clan Requests” section showing pending requests with:

  • Player name
  • Requested clan name
  • Date
  • Approve / Deny buttons

“Approve” creates the clan and room, then redirects to /mud/editor?room=<new-room-id>.

Add a “Clans” section showing all active clans:

  • Clan name
  • Leader
  • Member count
  • Hall room ID

Room Type

Add clan=(unit @tas) to the room type. Movement handler checks:

?:  ?&  ?=(^ clan.dest-rm)
        !(has-clan-flag player-flags sid u.clan.dest-rm)
    ==
  "This is a private clan hall. Members only."

Where has-clan-flag checks for clan:<name> in the player’s flag set.

Clan Chat

clan chat <msg> or cchat <msg> sends a message to all online members of the player’s clan. Implementation: find the player’s clan:* flag, look up the clan, iterate sessions to find members with the same flag, send JSON message to each via SSE.

Message format in chat log:

[Clan] Grendel: hello everyone

Impact on Existing Systems

SystemChange
Room typeAdd clan=(unit @tas)
MovementBlock non-members from clan rooms
Player flagsclan:<name> flag on join, removed on leave/kick/disband
Admin dashboardClan requests section, clans overview
ImportParse clan field from room JSON
Citizen saveClan flag persists via player-flags

Not Included

  • Clan bank / shared gold
  • Cross-world clans
  • Clan leveling / perks / skills
  • Clan wars / PvP
  • Clan achievements
  • Clan housing beyond the admin-created hall