Tier 1: Core IRC channel modes and commands (+o/+v/+m/+t, KICK, NOTICE) #85
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Implement the core IRC channel functionality that users will immediately notice is missing. This is the foundation for all other mode enforcement.
Requirements
1. Channel Member Flags Schema (prerequisite for everything else)
Add proper boolean columns to
channel_memberstable:Per sneak's instruction: Use proper database types (boolean/integer columns), NOT a text string for modes. Each flag gets its own column.
Channel creator auto-gets +o: When a user JOINs and creates a new channel (ephemeral creation), they automatically get
is_operator = 1.2. MODE +o/+v/-o/-v (User Channel Modes)
MODE #channel +o nick— grant operator status (only existing +o can do this)MODE #channel -o nick— revoke operator statusMODE #channel +v nick— grant voice (only +o can do this)MODE #channel -v nick— revoke voice@nickfor operators,+nickfor voiced usersPREFIX=(ov)@+must be advertised3. MODE +m (Moderated)
is_moderated INTEGER NOT NULL DEFAULT 0column tochannelstableMODE #channel +m— only +o can setERR_CANNOTSENDTOCHAN(404)4. MODE +t (Topic Lock)
is_topic_locked INTEGER NOT NULL DEFAULT 0column tochannelstableMODE #channel +t— only +o can setERR_CHANOPRIVSNEEDED(482)5. KICK Command
KICK #channel nick [:reason]ERR_CHANOPRIVSNEEDED(482)ERR_USERNOTINCHANNEL(441)6. NOTICE Differentiation
Testing
Scope
This is Tier 1 only. Tier 2 (+b bans, +i invite-only, +s secret, +k key, +l limit) comes after this is merged.