degesch: show our own channel modes in prompt
This commit is contained in:
parent
ab15ec0a9a
commit
a8dc6ad141
12
degesch.c
12
degesch.c
|
@ -3690,6 +3690,13 @@ make_prompt (struct app_context *ctx, struct str *output)
|
||||||
str_append (output, "(unregistered)");
|
str_append (output, "(unregistered)");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (buffer->type == BUFFER_CHANNEL)
|
||||||
|
{
|
||||||
|
struct channel_user *channel_user =
|
||||||
|
irc_channel_get_user (buffer->channel, s->irc_user);
|
||||||
|
if (channel_user)
|
||||||
|
str_append (output, channel_user->prefixes.str);
|
||||||
|
}
|
||||||
str_append (output, s->irc_user->nickname);
|
str_append (output, s->irc_user->nickname);
|
||||||
if (*s->irc_user_mode)
|
if (*s->irc_user_mode)
|
||||||
str_append_printf (output, "(%s)", s->irc_user_mode);
|
str_append_printf (output, "(%s)", s->irc_user_mode);
|
||||||
|
@ -4118,7 +4125,7 @@ irc_handle_mode (struct server *s, const struct irc_message *msg)
|
||||||
char *modes = irc_to_utf8 (s->ctx, reconstructed);
|
char *modes = irc_to_utf8 (s->ctx, reconstructed);
|
||||||
free (reconstructed);
|
free (reconstructed);
|
||||||
|
|
||||||
// TODO: parse the mode change and apply it (our user & channel user modes)
|
// TODO: parse user mode changes
|
||||||
|
|
||||||
if (irc_is_channel (s, context))
|
if (irc_is_channel (s, context))
|
||||||
{
|
{
|
||||||
|
@ -4150,6 +4157,9 @@ irc_handle_mode (struct server *s, const struct irc_message *msg)
|
||||||
|
|
||||||
free (who);
|
free (who);
|
||||||
free (modes);
|
free (modes);
|
||||||
|
|
||||||
|
// Our own modes might have changed
|
||||||
|
refresh_prompt (s->ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue