diff options
| author | Nakidai <nakidai@disroot.org> | 2026-02-10 03:38:15 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2026-02-10 03:38:15 +0300 |
| commit | db996c22cd51cd46dd9afee1085a8af04cc7b53b (patch) | |
| tree | 3fdc59fc9f7d42a1e8f96d9ca615e2d8b19a60da /ircd.h | |
| parent | 15b0b805fe2e739c9d89b54e1bfb26beb79c3112 (diff) | |
| download | libreircd-db996c22cd51cd46dd9afee1085a8af04cc7b53b.tar.gz libreircd-db996c22cd51cd46dd9afee1085a8af04cc7b53b.zip | |
Add channel mode editing support
Well, an oper should have some way to manage their channel :)
Diffstat (limited to 'ircd.h')
| -rw-r--r-- | ircd.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ircd.h b/ircd.h index 29457d8..931948b 100644 --- a/ircd.h +++ b/ircd.h @@ -61,6 +61,13 @@ struct Peer time_t last, ping; }; +struct ChannelModeParam +{ + char *param; + int set; + char mode; +}; + struct Channel { enum { GLOBAL, LOCAL, MODELESS, SAFE } type; @@ -72,7 +79,11 @@ struct Channel BIT(CHANNEL_VOICE), } modes; } peers[CHANNEL_PEERS_MAX]; - size_t modes_c, peers_c; + size_t peers_c; + enum ChannelMode + { + BIT(CHANNEL_SECRET), + } modes; }; struct Oper @@ -101,6 +112,7 @@ void user_remove(size_t pid); int channel_join(struct Channel *channel, struct Peer *peer); int channel_exit(struct Channel *channel, struct Peer *peer); +const struct ChannelModeParam *channel_modes_parse(const struct Message *msg); void channel_remove(size_t cid); int parse_message(char *buf, struct Message *msg); |