diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-10-18 22:36:18 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-10-18 22:36:18 +0200 |
commit | 2bd4428f45b168ee12866dc5a2d9b960459e2182 (patch) | |
tree | 4507772e4ce11dd48b00bb3392e508f97a920f3a /src/plugins | |
parent | 3b81a4746a4e0b648df1e05c79e077cc93b69459 (diff) | |
download | weechat-2bd4428f45b168ee12866dc5a2d9b960459e2182.zip |
Remove unused option look.input_format, fix refresh bug with input prompt for IRC buffers
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-channel.c | 1 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-completion.c | 27 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.c | 10 |
4 files changed, 29 insertions, 11 deletions
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index ac4fa5858..f73c5e70a 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -102,7 +102,6 @@ irc_channel_new (struct t_irc_server *server, int channel_type, if (channel_type == IRC_CHANNEL_TYPE_CHANNEL) { - weechat_buffer_set (new_buffer, "nick", server->nick); if (weechat_config_integer (weechat_config_get ("weechat.look.nicklist"))) weechat_buffer_set (new_buffer, "nicklist", "1"); weechat_buffer_set (new_buffer, "nicklist_display_groups", "0"); diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index e89865ed1..1b862e487 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -3956,7 +3956,7 @@ irc_command_init () " s: mark a user for receive server notices\n" " w: user receives wallops\n" " o: operator flag"), - "%(irc_channel)|%m", &irc_command_mode, NULL); + "%(irc_channel)|%(irc_server_nick)", &irc_command_mode, NULL); weechat_hook_command ("motd", N_("get the \"Message Of The Day\""), N_("[target]"), diff --git a/src/plugins/irc/irc-completion.c b/src/plugins/irc/irc-completion.c index 6ca570412..686548c1d 100644 --- a/src/plugins/irc/irc-completion.c +++ b/src/plugins/irc/irc-completion.c @@ -59,6 +59,31 @@ irc_completion_server_cb (void *data, const char *completion_item, } /* + * irc_completion_server_nick_cb: callback for completion with self nick + * of current IRC server + */ + +int +irc_completion_server_nick_cb (void *data, const char *completion_item, + struct t_gui_buffer *buffer, + struct t_gui_completion *completion) +{ + IRC_GET_SERVER(buffer); + + /* make C compiler happy */ + (void) data; + (void) completion_item; + + if (ptr_server && ptr_server->nick) + { + weechat_hook_completion_list_add (completion, ptr_server->nick, + 1, WEECHAT_LIST_POS_SORT); + } + + return WEECHAT_RC_OK; +} + +/* * irc_completion_server_nicks_cb: callback for completion with nicks * of current IRC server */ @@ -363,6 +388,8 @@ void irc_completion_init () { weechat_hook_completion ("irc_server", &irc_completion_server_cb, NULL); + weechat_hook_completion ("irc_server_nick", + &irc_completion_server_nick_cb, NULL); weechat_hook_completion ("irc_server_nicks", &irc_completion_server_nicks_cb, NULL); weechat_hook_completion ("irc_servers", &irc_completion_servers_cb, NULL); diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 314e8fee0..85f5e9aca 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -300,21 +300,13 @@ irc_server_set_with_option (struct t_irc_server *server, void irc_server_set_nick (struct t_irc_server *server, const char *nick) { - struct t_irc_channel *ptr_channel; - if (server->nick) free (server->nick); server->nick = (nick) ? strdup (nick) : NULL; - weechat_buffer_set (server->buffer, "nick", (void *)nick); - weechat_buffer_set (server->buffer, "highlight_words", (void *)nick); - for (ptr_channel = server->channels; ptr_channel; - ptr_channel = ptr_channel->next_channel) - { - weechat_buffer_set (ptr_channel->buffer, "nick", (void *)nick); - } + weechat_bar_item_update ("input_prompt"); } /* |