degesch: add self to completion in server buffers

This commit is contained in:
Přemysl Eric Janouch 2015-08-13 00:23:56 +02:00
parent 328bf9af1e
commit 4ae95be9db
1 changed files with 6 additions and 0 deletions

View File

@ -8755,6 +8755,12 @@ complete_nicknames (struct app_context *ctx, struct completion *data,
const char *word, struct str_vector *output)
{
struct buffer *buffer = ctx->current_buffer;
if (buffer->type == BUFFER_SERVER)
{
struct user *self_user = buffer->server->irc_user;
if (self_user)
str_vector_add (output, self_user->nickname);
}
if (buffer->type != BUFFER_CHANNEL)
return;