diff options
author | dequis <dx@dxzone.com.ar> | 2015-09-12 05:25:33 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-10-08 02:25:56 -0300 |
commit | 687ec880201e4872a9abf72f5efe135164fc349b (patch) | |
tree | 4e49f1d713799ff679954978f4c8bd94b096282c /irc_channel.c | |
parent | 0b0bb4c68a1c87b8f77f266ea8e836758203f53e (diff) |
IRCv3 multi-prefix... but mostly just adding prefixes to WHO
We can't actually have multiple prefixes internally, so the only thing
missing for multi-prefix compliance is actually having the prefix in the
WHO reply, which is a rfc1459 thing.
Note to future self: check irc logs for the implementation I threw away.
The one that actually handled multiple prefixes. I hope that's useful.
Diffstat (limited to 'irc_channel.c')
-rw-r--r-- | irc_channel.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/irc_channel.c b/irc_channel.c index cbd306a3..714e974a 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -428,6 +428,18 @@ 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) { + return '@'; + } else if (icu->flags & IRC_CHANNEL_USER_HALFOP) { + return '%'; + } else if (icu->flags & IRC_CHANNEL_USER_VOICE) { + return '+'; + } + return 0; +} + void irc_channel_auto_joins(irc_t *irc, account_t *acc) { GSList *l; |