1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

Remove unused option look.input_format, fix refresh bug with input prompt for IRC buffers

This commit is contained in:
Sebastien Helleu
2008-10-18 22:36:18 +02:00
parent 3b81a4746a
commit 2bd4428f45
12 changed files with 31 additions and 157 deletions
-1
View File
@@ -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");
+1 -1
View File
@@ -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]"),
+27
View File
@@ -58,6 +58,31 @@ irc_completion_server_cb (void *data, const char *completion_item,
return WEECHAT_RC_OK;
}
/*
* 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);
+1 -9
View File
@@ -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");
}
/*