mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 03:03:12 +02:00
irc: fix refresh of bar item "irc_channel" after join/part/kick/kill (issue #86)
This commit is contained in:
@@ -646,6 +646,18 @@ irc_bar_item_buffer_switch (void *data, const char *signal,
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Updates bar items with the channel.
|
||||
*/
|
||||
|
||||
void
|
||||
irc_bar_item_update_channel ()
|
||||
{
|
||||
weechat_bar_item_update ("buffer_name");
|
||||
weechat_bar_item_update ("buffer_short_name");
|
||||
weechat_bar_item_update ("irc_channel");
|
||||
}
|
||||
|
||||
/*
|
||||
* Initializes IRC bar items.
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef WEECHAT_IRC_BAR_ITEM_H
|
||||
#define WEECHAT_IRC_BAR_ITEM_H 1
|
||||
|
||||
extern void irc_bar_item_update_channel ();
|
||||
extern void irc_bar_item_init ();
|
||||
|
||||
#endif /* WEECHAT_IRC_BAR_ITEM_H */
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "../weechat-plugin.h"
|
||||
#include "irc.h"
|
||||
#include "irc-protocol.h"
|
||||
#include "irc-bar-item.h"
|
||||
#include "irc-buffer.h"
|
||||
#include "irc-channel.h"
|
||||
#include "irc-color.h"
|
||||
@@ -696,10 +697,7 @@ IRC_PROTOCOL_CALLBACK(join)
|
||||
}
|
||||
|
||||
if (local_join)
|
||||
{
|
||||
weechat_bar_item_update ("buffer_name");
|
||||
weechat_bar_item_update ("buffer_short_name");
|
||||
}
|
||||
irc_bar_item_update_channel ();
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -809,8 +807,7 @@ IRC_PROTOCOL_CALLBACK(kick)
|
||||
}
|
||||
}
|
||||
|
||||
weechat_bar_item_update ("buffer_name");
|
||||
weechat_bar_item_update ("buffer_short_name");
|
||||
irc_bar_item_update_channel ();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -893,8 +890,7 @@ IRC_PROTOCOL_CALLBACK(kill)
|
||||
*/
|
||||
irc_nick_free_all (server, ptr_channel);
|
||||
|
||||
weechat_bar_item_update ("buffer_name");
|
||||
weechat_bar_item_update ("buffer_short_name");
|
||||
irc_bar_item_update_channel ();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1577,8 +1573,7 @@ IRC_PROTOCOL_CALLBACK(part)
|
||||
else
|
||||
ptr_channel->part = 1;
|
||||
}
|
||||
weechat_bar_item_update ("buffer_name");
|
||||
weechat_bar_item_update ("buffer_short_name");
|
||||
irc_bar_item_update_channel ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "../weechat-plugin.h"
|
||||
#include "irc.h"
|
||||
#include "irc-server.h"
|
||||
#include "irc-bar-item.h"
|
||||
#include "irc-buffer.h"
|
||||
#include "irc-channel.h"
|
||||
#include "irc-color.h"
|
||||
@@ -4046,8 +4047,7 @@ irc_server_connect (struct t_irc_server *server)
|
||||
weechat_buffer_set (server->buffer, "display", "auto");
|
||||
}
|
||||
|
||||
weechat_bar_item_update ("buffer_name");
|
||||
weechat_bar_item_update ("buffer_short_name");
|
||||
irc_bar_item_update_channel ();
|
||||
|
||||
irc_server_set_index_current_address (server,
|
||||
server->index_current_address);
|
||||
|
||||
Reference in New Issue
Block a user