diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-03-23 11:26:43 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-03-23 11:26:43 +0100 |
commit | 495378eb57abb4e06800a2f8f0a80251048f343d (patch) | |
tree | ce3feb56305c06455de5606ac79f0c19b794dcf5 /src/plugins | |
parent | 988997e96e5fb20bcef48cf0b7a15cb022877ceb (diff) | |
download | weechat-495378eb57abb4e06800a2f8f0a80251048f343d.zip |
Add completion with self nick in irc/jabber private buffers
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-completion.c | 6 | ||||
-rw-r--r-- | src/plugins/jabber/jabber-completion.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-completion.c b/src/plugins/irc/irc-completion.c index 4052b0bec..d10f5477a 100644 --- a/src/plugins/irc/irc-completion.c +++ b/src/plugins/irc/irc-completion.c @@ -239,10 +239,16 @@ irc_completion_channel_nicks_cb (void *data, const char *completion_item, WEECHAT_LIST_POS_END); break; case IRC_CHANNEL_TYPE_PRIVATE: + /* remote nick */ weechat_hook_completion_list_add (completion, ptr_channel->name, 0, WEECHAT_LIST_POS_SORT); + /* add self nick at the end */ + weechat_hook_completion_list_add (completion, + ptr_server->nick, + 1, + WEECHAT_LIST_POS_END); break; } ptr_channel->nick_completion_reset = 0; diff --git a/src/plugins/jabber/jabber-completion.c b/src/plugins/jabber/jabber-completion.c index e08f665b1..5df9044e4 100644 --- a/src/plugins/jabber/jabber-completion.c +++ b/src/plugins/jabber/jabber-completion.c @@ -257,10 +257,20 @@ jabber_completion_muc_buddies_cb (void *data, const char *completion_item, } break; case JABBER_MUC_TYPE_PRIVATE: + /* remote buddy */ weechat_hook_completion_list_add (completion, ptr_muc->name, 0, WEECHAT_LIST_POS_SORT); + /* add local name at the end */ + local_name = jabber_server_get_local_name (ptr_server); + if (local_name && local_name[0]) + { + weechat_hook_completion_list_add (completion, + local_name, + 1, + WEECHAT_LIST_POS_END); + } break; } ptr_muc->nick_completion_reset = 0; |