diff options
author | Marius Halden <marius.h@lden.org> | 2015-11-08 16:11:08 +0100 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-05-07 14:24:24 +0200 |
commit | 338d8fed5e875048b6642f0ce54b6f25bd7ddcfb (patch) | |
tree | 2948aad367432146e0ab01607f6647468ff9abc5 /irc_channel.c | |
parent | be652533d16a22dd1597e594b5845b8e2f1cde1e (diff) |
Add support for owner/admin channel modes
Diffstat (limited to 'irc_channel.c')
-rw-r--r-- | irc_channel.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/irc_channel.c b/irc_channel.c index 3ccbce55..e8564da7 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -441,7 +441,11 @@ void irc_channel_set_mode(irc_channel_t *ic, const char *s) char irc_channel_user_get_prefix(irc_channel_user_t *icu) { - if (icu->flags & IRC_CHANNEL_USER_OP) { + if (icu->flags & IRC_CHANNEL_USER_OWNER) { + return '~'; + } else if (icu->flags & IRC_CHANNEL_USER_ADMIN) { + return '&'; + } else if (icu->flags & IRC_CHANNEL_USER_OP) { return '@'; } else if (icu->flags & IRC_CHANNEL_USER_HALFOP) { return '%'; @@ -920,6 +924,10 @@ static char *set_eval_show_users(set_t *set, char *value) modechar = IRC_CHANNEL_USER_HALFOP; } else if (last == '@') { modechar = IRC_CHANNEL_USER_OP; + } else if (last == '&') { + modechar = IRC_CHANNEL_USER_ADMIN; + } else if (last == '~') { + modechar = IRC_CHANNEL_USER_OWNER; } if (strncmp(*part, "offline", 7) == 0) { |