mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
irc: display nick changes in server buffer (closes #188)
This commit is contained in:
@@ -21,6 +21,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
||||
weechat.look.command_incomplete (task #5419)
|
||||
* api: use microseconds instead of milliseconds in functions util_timeval_diff
|
||||
and util_timeval_add
|
||||
* irc: display nick changes in server buffer (closes #188)
|
||||
* irc: disable creation of temporary servers by default with command /connect,
|
||||
new option irc.look.temporary_servers
|
||||
* trigger: add option "restore" in command /trigger
|
||||
|
||||
@@ -1055,6 +1055,33 @@ IRC_PROTOCOL_CALLBACK(nick)
|
||||
|
||||
ptr_nick_found = NULL;
|
||||
|
||||
/* first display message in server buffer if it's local nick */
|
||||
if (local_nick)
|
||||
{
|
||||
/* temporary disable hotlist */
|
||||
weechat_buffer_set (NULL, "hotlist", "-");
|
||||
|
||||
snprintf (str_tags, sizeof (str_tags),
|
||||
"irc_nick1_%s,irc_nick2_%s",
|
||||
nick,
|
||||
new_nick);
|
||||
weechat_printf_date_tags (server->buffer,
|
||||
date,
|
||||
irc_protocol_tags (command,
|
||||
str_tags,
|
||||
NULL,
|
||||
address),
|
||||
_("%sYou are now known as "
|
||||
"%s%s%s"),
|
||||
weechat_prefix ("network"),
|
||||
IRC_COLOR_CHAT_NICK_SELF,
|
||||
new_nick,
|
||||
IRC_COLOR_RESET);
|
||||
|
||||
/* enable hotlist */
|
||||
weechat_buffer_set (NULL, "hotlist", "+");
|
||||
}
|
||||
|
||||
for (ptr_channel = server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
@@ -1094,7 +1121,7 @@ IRC_PROTOCOL_CALLBACK(nick)
|
||||
if (!ptr_nick->host)
|
||||
ptr_nick->host = strdup (address);
|
||||
|
||||
/* change nick and display message on all channels */
|
||||
/* change nick and display message on channel */
|
||||
old_color = strdup (ptr_nick->color);
|
||||
irc_nick_change (server, ptr_channel, ptr_nick, new_nick);
|
||||
if (local_nick)
|
||||
|
||||
Reference in New Issue
Block a user