diff options
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; |